[PATCH 0/5] watchdog: Drop platform_driver_probe() and convert to platform remove callback returning void (part II)

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

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux