Linux-ide Archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Sergey Shtylyov <s.shtylyov@omp.ru>,
	linux-ide@vger.kernel.org, kernel@pengutronix.de,
	linux-kbuild@vger.kernel.org
Subject: [PATCH 0/4] ata: Drop platform_driver_probe() and convert to platform remove callback returning void (part II)
Date: Sun,  5 Nov 2023 16:00:35 +0100	[thread overview]
Message-ID: <20231105150037.3724669-6-u.kleine-koenig@pengutronix.de> (raw)

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


             reply	other threads:[~2023-11-05 15:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-05 15:00 Uwe Kleine-König [this message]
2023-11-05 15:00 ` [PATCH 1/4] ata: pata_falcon: Stop using module_platform_driver_probe() Uwe Kleine-König
2023-11-06  9:55   ` Sergey Shtylyov
2023-11-05 15:00 ` [PATCH 2/4] ata: pata_gayle: " Uwe Kleine-König
2023-11-06  9:55   ` Sergey Shtylyov
2023-11-05 15:00 ` [PATCH 3/4] ata: pata_falcon: Convert to platform remove callback returning void Uwe Kleine-König
2023-11-06  9:56   ` Sergey Shtylyov
2023-11-05 15:00 ` [PATCH 4/4] ata: pata_gayle: " Uwe Kleine-König
2023-11-06  9:57   ` Sergey Shtylyov
2023-11-07 10:32 ` [PATCH 0/4] ata: Drop platform_driver_probe() and convert to platform remove callback returning void (part II) Niklas Cassel
2023-11-08  1:10 ` Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231105150037.3724669-6-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=dlemoal@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=s.shtylyov@omp.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).