<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/char/ipmi/ipmi_si_platform.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-04-17T19:55:04+00:00</updated>
<entry>
<title>ipmi: ipmi_si_platform: Convert to platform remove callback returning void</title>
<updated>2024-04-17T19:55:04+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2024-03-05T16:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f99a996574275d33d64ee1fdee6b49369bc07a9f'/>
<id>urn:sha1:f99a996574275d33d64ee1fdee6b49369bc07a9f</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Message-Id: &lt;789cd7876780241430dd5604bc4322453fe4e581.1709655755.git.u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: si: Use device_get_match_data()</title>
<updated>2023-12-19T12:32:27+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-11-15T21:02:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5be50eb5ae99d890cc22ab49753330cce8731599'/>
<id>urn:sha1:5be50eb5ae99d890cc22ab49753330cce8731599</id>
<content type='text'>
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Message-Id: &lt;20231115210230.3744198-1-robh@kernel.org&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi_si: fix -Wvoid-pointer-to-enum-cast warning</title>
<updated>2023-08-15T20:46:06+00:00</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-08-09T21:05:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d40f09c1a23024f0e550d9423f4d389672e1dfaf'/>
<id>urn:sha1:d40f09c1a23024f0e550d9423f4d389672e1dfaf</id>
<content type='text'>
With W=1 we see the following warning:

|  drivers/char/ipmi/ipmi_si_platform.c:272:15: error: \
|       cast to smaller integer type 'enum si_type' from \
|       'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
|    272 |         io.si_type      = (enum si_type) match-&gt;data;
|        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~

This is due to the fact that the `si_type` enum members are int-width
and a cast from pointer-width down to int will cause truncation and
possible data loss. Although in this case `si_type` has only a few
enumerated fields and thus there is likely no data loss occurring.
Nonetheless, this patch is necessary to the goal of promoting this
warning out of W=1.

Link: https://github.com/ClangBuiltLinux/linux/issues/1902
Link: https://lore.kernel.org/llvm/202308081000.tTL1ElTr-lkp@intel.com/
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Message-Id: &lt;20230809-cbl-1902-v1-1-92def12d1dea@google.com&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: Change request_module to request_module_nowait</title>
<updated>2023-06-20T14:59:53+00:00</updated>
<author>
<name>Corey Minyard</name>
<email>minyard@acm.org</email>
</author>
<published>2023-06-20T14:59:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e87443a5f68da7bacefe933c90453ae7215263b3'/>
<id>urn:sha1:e87443a5f68da7bacefe933c90453ae7215263b3</id>
<content type='text'>
When probing for an ACPI-specified IPMI device, the code would request
that the acpi_ipmi module be loaded ACPI operations through IPMI can be
performed.  This could happen through module load context, for instance,
if an I2C module is loaded that caused the IPMI interface to be probed.

This is not allowed because a synchronous module load in this context
can result in an deadlock, and I was getting a warning:

[   23.967853] WARNING: CPU: 0 PID: 21 at kernel/module/kmod.c:144 __request_module+0x1de/0x2d0
[   23.968852] Modules linked in: i2c_i801 ipmi_ssif

The IPMI driver is not dependent on acpi_ipmi, so just change the called
to request_module_nowait to make the load asynchronous.

Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>parisc: Make struct parisc_driver::remove() return void</title>
<updated>2021-08-30T08:18:25+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2021-08-07T09:19:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87875c1084a28364dad8cd4f9ecbfdfe0b845ad5'/>
<id>urn:sha1:87875c1084a28364dad8cd4f9ecbfdfe0b845ad5</id>
<content type='text'>
The caller of this function (parisc_driver_remove() in
arch/parisc/kernel/drivers.c) ignores the return value, so better don't
return any value at all to not wake wrong expectations in driver authors.

The only function that could return a non-zero value before was
ipmi_parisc_remove() which returns the return value of
ipmi_si_remove_by_dev(). Make this function return void, too, as for all
other callers the value is ignored, too.

Also fold in a small checkpatch fix for:

WARNING: Unnecessary space before function pointer arguments
+	void (*remove) (struct parisc_device *dev);

Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt; (for drivers/input)
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by:  Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Acked-by: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>ipmi_si: Join string literals back</title>
<updated>2021-04-02T17:53:42+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-04-02T17:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=07cbd87b0416d7b6b8419b2a56bc63659de5d066'/>
<id>urn:sha1:07cbd87b0416d7b6b8419b2a56bc63659de5d066</id>
<content type='text'>
For easy grepping on debug purposes join string literals back in
the messages.

No functional change.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Message-Id: &lt;20210402174334.13466-11-andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi_si: Use proper ACPI macros to check error code for failures</title>
<updated>2021-04-02T17:53:25+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-04-02T17:43:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd7a33bfa1f1d0295058003899568570a7de0998'/>
<id>urn:sha1:bd7a33bfa1f1d0295058003899568570a7de0998</id>
<content type='text'>
Instead of direct comparison, use proper ACPI macros to check error code
for failures.

While at it, drop unneeded 'else' keyword.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Message-Id: &lt;20210402174334.13466-5-andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi_si: Utilize temporary variable to hold device pointer</title>
<updated>2021-04-02T17:53:22+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-04-02T17:43:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96c4d0de912c6a7cfc8f7aae1aadff9467d7b996'/>
<id>urn:sha1:96c4d0de912c6a7cfc8f7aae1aadff9467d7b996</id>
<content type='text'>
Introduce a temporary variable to hold a device pointer.
It can be utilized in the -&gt;probe() and save a bit of LOCs.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Message-Id: &lt;20210402174334.13466-4-andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi_si: Remove bogus err_free label</title>
<updated>2021-04-02T17:53:19+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-04-02T17:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea63a26e2b7105d3bef517d1ca893b9e666488a8'/>
<id>urn:sha1:ea63a26e2b7105d3bef517d1ca893b9e666488a8</id>
<content type='text'>
There is no more 'free' in the error path, so drop the label and
return errors inline.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Message-Id: &lt;20210402174334.13466-3-andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi_si: Switch to use platform_get_mem_or_io()</title>
<updated>2021-04-02T17:53:15+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2021-04-02T17:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=079dea006fb819c2f24f975da6627b161108083d'/>
<id>urn:sha1:079dea006fb819c2f24f975da6627b161108083d</id>
<content type='text'>
Switch to use new platform_get_mem_or_io() instead of home grown analogue.
Note, we also introduce ipmi_set_addr_data_and_space() helper here.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Message-Id: &lt;20210402174334.13466-2-andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
</feed>
