<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/char/ipmi/ipmi_poweroff.c, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-01-28T12:48:37+00:00</updated>
<entry>
<title>treewide: const qualify ctl_tables where applicable</title>
<updated>2025-01-28T12:48:37+00:00</updated>
<author>
<name>Joel Granados</name>
<email>joel.granados@kernel.org</email>
</author>
<published>2025-01-28T12:48:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1751f872cc97f992ed5c4c72c55588db1f0021e1'/>
<id>urn:sha1:1751f872cc97f992ed5c4c72c55588db1f0021e1</id>
<content type='text'>
Add the const qualifier to all the ctl_tables in the tree except for
watchdog_hardlockup_sysctl, memory_allocation_profiling_sysctls,
loadpin_sysctl_table and the ones calling register_net_sysctl (./net,
drivers/inifiniband dirs). These are special cases as they use a
registration function with a non-const qualified ctl_table argument or
modify the arrays before passing them on to the registration function.

Constifying ctl_table structs will prevent the modification of
proc_handler function pointers as the arrays would reside in .rodata.
This is made possible after commit 78eb4ea25cd5 ("sysctl: treewide:
constify the ctl_table argument of proc_handlers") constified all the
proc_handlers.

Created this by running an spatch followed by a sed command:
Spatch:
    virtual patch

    @
    depends on !(file in "net")
    disable optional_qualifier
    @

    identifier table_name != {
      watchdog_hardlockup_sysctl,
      iwcm_ctl_table,
      ucma_ctl_table,
      memory_allocation_profiling_sysctls,
      loadpin_sysctl_table
    };
    @@

    + const
    struct ctl_table table_name [] = { ... };

sed:
    sed --in-place \
      -e "s/struct ctl_table .table = &amp;uts_kern/const struct ctl_table *table = \&amp;uts_kern/" \
      kernel/utsname_sysctl.c

Reviewed-by: Song Liu &lt;song@kernel.org&gt;
Acked-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt; # for kernel/trace/
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt; # SCSI
Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt; # xfs
Acked-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Acked-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Bill O'Donnell &lt;bodonnel@redhat.com&gt;
Acked-by: Baoquan He &lt;bhe@redhat.com&gt;
Acked-by: Ashutosh Dixit &lt;ashutosh.dixit@intel.com&gt;
Acked-by: Anna Schumaker &lt;anna.schumaker@oracle.com&gt;
Signed-off-by: Joel Granados &lt;joel.granados@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi: make ipmi_destroy_user() return void</title>
<updated>2025-01-03T03:11:52+00:00</updated>
<author>
<name>Vitaliy Shevtsov</name>
<email>v.shevtsov@maxima.ru</email>
</author>
<published>2024-12-25T01:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b6442a3bdd7e0d528122d63c24bd57f6cb05671'/>
<id>urn:sha1:9b6442a3bdd7e0d528122d63c24bd57f6cb05671</id>
<content type='text'>
Return value of ipmi_destroy_user() has no meaning, because it's always
zero and callers can do nothing with it. And in most cases it's not
checked. So make this function return void. This also will eliminate static
code analyzer warnings such as unreachable code/redundant comparison when
the return value is checked against non-zero value.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Signed-off-by: Vitaliy Shevtsov &lt;v.shevtsov@maxima.ru&gt;
Message-ID: &lt;20241225014532.20091-1-v.shevtsov@maxima.ru&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
</content>
</entry>
<entry>
<title>char-misc: Remove the now superfluous sentinel element from ctl_table array</title>
<updated>2023-10-11T19:16:13+00:00</updated>
<author>
<name>Joel Granados</name>
<email>j.granados@samsung.com</email>
</author>
<published>2023-10-02T08:55:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed1aa959b50854bddd7252d404aa6fdbcfa60b99'/>
<id>urn:sha1:ed1aa959b50854bddd7252d404aa6fdbcfa60b99</id>
<content type='text'>
This commit comes at the tail end of a greater effort to remove the
empty elements at the end of the ctl_table arrays (sentinels) which
will reduce the overall build time size of the kernel and run time
memory bloat by ~64 bytes per sentinel (further information Link :
https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)

Remove sentinel from impi_table and random_table

Signed-off-by: Joel Granados &lt;j.granados@samsung.com&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi: simplify sysctl registration</title>
<updated>2023-03-02T22:16:37+00:00</updated>
<author>
<name>Luis Chamberlain</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2023-03-02T20:46:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d352cb47df7540a52bf2d0c33d90694c5cdb6cb8'/>
<id>urn:sha1:d352cb47df7540a52bf2d0c33d90694c5cdb6cb8</id>
<content type='text'>
register_sysctl_table() is a deprecated compatibility wrapper.
register_sysctl() can do the directory creation for you so just use
that.

Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Message-Id: &lt;20230302204612.782387-3-mcgrof@kernel.org&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Add an intializer for ipmi_recv_msg struct</title>
<updated>2022-05-12T15:00:03+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2022-04-12T20:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f214549d717310f795c20db9497db3938116399d'/>
<id>urn:sha1:f214549d717310f795c20db9497db3938116399d</id>
<content type='text'>
Don't hand-initialize the struct here, create a macro to initialize it
so new fields added don't get forgotten in places.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Add an intializer for ipmi_smi_msg struct</title>
<updated>2022-05-12T15:00:03+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2022-04-12T20:38:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9824117dd964ecebf5d81990dbf21dfb56445049'/>
<id>urn:sha1:9824117dd964ecebf5d81990dbf21dfb56445049</id>
<content type='text'>
There was a "type" element added to this structure, but some static
values were missed.  The default value will be zero, which is correct,
but create an initializer for the type and initialize the type properly
in the initializer to avoid future issues.

Reported-by: Joe Wiese &lt;jwiese@rackspace.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Use more common logging styles</title>
<updated>2018-09-18T21:15:33+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2018-05-09T15:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25880f7d61a4f2fdda29cadae55985431df82c5c'/>
<id>urn:sha1:25880f7d61a4f2fdda29cadae55985431df82c5c</id>
<content type='text'>
Add and use #define pr_fmt/dev_fmt, and remove #define PFX

This also prefixes some messages that were not previously prefixed.

Miscellanea:

o Convert printk(KERN_&lt;level&gt; to pr_&lt;level&gt;(
o Use %s, __func__ where appropriate

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Rename ipmi_user_t to struct ipmi_user *</title>
<updated>2018-04-18T15:22:55+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2018-04-06T01:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2911c9886c8d5435a8778ce4888f6e4b8d7c900c'/>
<id>urn:sha1:2911c9886c8d5435a8778ce4888f6e4b8d7c900c</id>
<content type='text'>
Get rid of that non-compliance in the user files.  Include files
will come later.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi/parisc: Add IPMI chassis poweroff for certain HP PA-RISC and IA-64 servers</title>
<updated>2018-03-27T16:04:17+00:00</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2018-03-27T15:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6185e285c5c7cfeab739bae7f206ced695f09c7'/>
<id>urn:sha1:c6185e285c5c7cfeab739bae7f206ced695f09c7</id>
<content type='text'>
This patch allows HP PA-RISC servers like rp3410/rp3440 and the HP C8000
workstation with an IPMI controller that predate IPMI 1.5 to use the standard
poweroff or powercycle commands.

These systems firmware don't set the chassis capability bit in the Get
Device ID, but they do implement the standard poweroff and powercycle
commands.

Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: use ARRAY_SIZE for poweroff_functions array sizing calculation</title>
<updated>2018-03-07T01:47:51+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-03-02T14:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8824babad2d81fcff43e02f028cc437a3f99ce5'/>
<id>urn:sha1:e8824babad2d81fcff43e02f028cc437a3f99ce5</id>
<content type='text'>
Use the ARRAY_SIZE macro on a array poweroff_functions to determine
size of the array. Improvement suggested by Coccinelle.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
</feed>
