Re: [PATCH 0/3] hwspinlock: Convert to platform remove callback returning void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 14, 2023 at 07:00:20PM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> this patch series adapts the platform drivers below drivers/hwspinlock to use
> the .remove_new() callback. Compared to the traditional .remove() callback
> .remove_new() returns no value. This is a good thing because the driver core
> doesn't (and cannot) cope for errors during remove. The only effect of a
> non-zero return value in .remove() is that the driver core emits a warning. The
> device is removed anyhow and an early return from .remove() usually yields a
> resource leak.
> 
> By changing the remove callback to return void driver authors cannot reasonably
> assume any more that there is some kind of cleanup later.
> 
> The omap driver could return -EBUSY. This is first changed to return
> zero to drop the duplicated error message. I assume this error path is
> dangerous. For sure the platform device binding goes away and so
> devm_platform_ioremap_resource is undone. So probably the user of the
> hwspinlock that prevented its removal will soon access an unmapped
> virtual address resulting in an oops. This is true with and without my
> patch. IMHO hwspin_lock_unregister() shouldn't return an error code but
> care that all users go away and then return void.
> 
> After this change the two platform_drivers can be trivially converted to
> .remove_new().

Gentle ping!

Who is supposed to apply this series (or point out a good reason to not
do that)?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux