[PATCH 0/4] ata: 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 two 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.
All conversions are trivial as the remove functions return zero
unconditionally. The other ata drivers were already converted earlier,
my coccinelle script just missed these two drivers (because of the
__exit_p macro).

Best regards
Uwe

Uwe Kleine-König (4):
  ata: pata_falcon: Stop using module_platform_driver_probe()
  ata: pata_gayle: Stop using module_platform_driver_probe()
  ata: pata_falcon: Convert to platform remove callback returning void
  ata: pata_gayle: Convert to platform remove callback returning void

 drivers/ata/pata_falcon.c | 11 +++++------
 drivers/ata/pata_gayle.c  | 11 +++++------
 2 files changed, 10 insertions(+), 12 deletions(-)


base-commit: e27090b1413ff236ca1aec26d6b022149115de2c
-- 
2.42.0




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux