Linux Watchdog driver development
 help / color / mirror / Atom feed
* [PATCH 0/5] watchdog: Drop platform_driver_probe() and convert to platform remove callback returning void (part II)
@ 2023-11-06 15:48 Uwe Kleine-König
  2023-11-06 15:48 ` [PATCH 1/5] watchdog: at91sam9: Stop using module_platform_driver_probe() Uwe Kleine-König
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2023-11-06 15:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, linux-watchdog,
	linux-arm-kernel, kernel, Xingyu Wu, Samin Guo, linux-kbuild

Hello,

there are two different types of patches here that would justify to
different series. But as the patches are not independent I chose to put
them in a single series.

The first two patches drop usage of platform_driver_probe(). This is a
concept that isn't so relevant any more today. I didn't check, but it
saves typically only a few 100k and there are thoughts to deprecate it
to simplify the core. Getting the usage right is not trivial though the
drivers here got it nearly right. The alternative to these patches is to
add __refdata to the driver struct ideally with a comment describing the
need like is e.g. done in commit 5b44abbc39ca ("platform/x86: hp-wmi::
Mark driver struct with __refdata to prevent section mismatch warning").
Note that the warning only happens starting with commit f177cd0c15fc
("modpost: Don't let "driver"s reference .exit.*") that is expected to
be part of v6.7-rc1.

The remaining three patches convert the platform drivers to
.remove_new(), see commit 5c5a7680e67b ("platform: Provide a remove
callback that returns no value") for an extended explanation and the
eventual goal. Some time ago I already did this to watchdog drivers, but
I missed the at91sam9_wdt and txx9wdt driver, because my coccinelle
patch failed to detect these as patch opportunities (because of the
__exit_p annotation). the starfive-wdt driver is new since then.

Best regards
Uwe

Uwe Kleine-König (5):
  watchdog: at91sam9: Stop using module_platform_driver_probe()
  watchdog: txx9: Stop using module_platform_driver_probe()
  watchdog: at91sam9_wdt: Convert to platform remove callback returning
    void
  watchdog: starfive-wdt: Convert to platform remove callback returning
    void
  watchdog: txx9wdt: Convert to platform remove callback returning void

 drivers/watchdog/at91sam9_wdt.c | 12 +++++-------
 drivers/watchdog/starfive-wdt.c |  6 ++----
 drivers/watchdog/txx9wdt.c      | 11 +++++------
 3 files changed, 12 insertions(+), 17 deletions(-)

base-commit: 3ff7a5781ceee3befb9224d29cef6e6a4766c5fe
-- 
2.42.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-11-07  9:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 15:48 [PATCH 0/5] watchdog: Drop platform_driver_probe() and convert to platform remove callback returning void (part II) Uwe Kleine-König
2023-11-06 15:48 ` [PATCH 1/5] watchdog: at91sam9: Stop using module_platform_driver_probe() Uwe Kleine-König
2023-11-06 16:01   ` Guenter Roeck
2023-11-07  9:19   ` Nicolas Ferre
2023-11-06 15:48 ` [PATCH 2/5] watchdog: txx9: " Uwe Kleine-König
2023-11-06 16:02   ` Guenter Roeck
2023-11-06 15:48 ` [PATCH 3/5] watchdog: at91sam9_wdt: Convert to platform remove callback returning void Uwe Kleine-König
2023-11-06 16:02   ` Guenter Roeck
2023-11-07  9:20   ` Nicolas Ferre
2023-11-06 15:48 ` [PATCH 4/5] watchdog: starfive-wdt: " Uwe Kleine-König
2023-11-06 16:02   ` Guenter Roeck
2023-11-06 15:48 ` [PATCH 5/5] watchdog: txx9wdt: " Uwe Kleine-König
2023-11-06 16:02   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox