Re: [PATCH 00/34] watchdog: Convert to platform remove callback returning void

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

 



Hello,

[dropping Leela Krishna Amudala from the list of recipents as their
email address bounces]

On Fri, Mar 03, 2023 at 10:36:42PM +0100, Uwe Kleine-König wrote:
> this patch series adapts the platform drivers below drivers/watchdog 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. One driver suffering from
> this problem (s3c2410) is fixed by the first patch.
> 
> By changing the remove callback to return void driver authors cannot
> reasonably (but wrongly) assume any more that there happens some kind of
> cleanup later.
> 
> All watchdog drivers but the above mentioned one returned zero
> unconditionally in their remove callback, so they could all be converted
> trivially to .remove_new().
> 
> Note that this series depends on commit 5c5a7680e67b ("platform: Provide
> a remove callback that returns no value") that is already in Linus' tree
> but not yet included in a tagged version.

This is fixed now, v6.3-rc1 is suitable as a base for this series.

Guenter pointed out that for some drivers it is possible to make use of
devm_watchdog_register_device() and drop the remove callback completely.
Also there is an alternative series that gets rid of s3c2410's remove
callback.

I'll send out a series converting the three drivers to
devm_watchdog_register_device() as Guenter suggested. To apply the
remainder of this series you might want to do:

	b4 am -l -P 2-7,9-25,27,29-33 20230303213716.2123717-1-u.kleine-koenig@xxxxxxxxxxxxxx

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 SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux