From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Dawei Li <set_pte_at@outlook.com>
Cc: rafael@kernel.org, gregkh@linuxfoundation.org,
dvhart@infradead.org, andy@infradead.org, lenb@kernel.org,
arnd@arndb.de, peterhuewe@gmx.de, kys@microsoft.com,
kronos.it@gmail.com, dmitry.torokhov@gmail.com,
bleung@chromium.org, sujith.thomas@intel.com,
vithampi@vmware.com, lee@kernel.org, wim@linux-watchdog.org,
jgross@suse.com, davem@davemloft.net, linux-acpi@vger.kernel.org,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] acpi: make remove callback of acpi driver void
Date: Sun, 6 Nov 2022 17:54:22 +0100 [thread overview]
Message-ID: <20221106165422.nzfw36oj5q2splnc@pengutronix.de> (raw)
In-Reply-To: <TYCP286MB232348AC39E6F4966FA9494BCA3D9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]
Hello,
On Sun, Nov 06, 2022 at 10:57:53PM +0800, Dawei Li wrote:
> For bus-based driver, device removal is implemented as:
> 1 device_remove()->
> 2 bus->remove()->
> 3 driver->remove()
>
> Driver core needs _no_ inform from callee(bus driver) about the
> result of remove callback. In that case,
> commit <fc7a6209d571> ("bus: Make remove callback return void")
> forces struct bus_type::remove() be void-returned.
>
> Now we have the situation that both 1 & 2 of calling chain are
> void-returned, so it does _not_ make much sense for 3(driver->remove)
> to return non-void to its caller.
>
> So the basic idea behind this change is making remove() callback of
> any bus-based driver to be void-returned.
>
> This change itself, is for device drivers based on acpi-bus.
>
> Signed-off-by: Dawei Li <set_pte_at@outlook.com>
Nice,
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
It might be worth to point out that the callers of the remove callback
(i.e. acpi_device_probe and acpi_device_remove) silently ignore the
return value already today and even since before commit fc7a6209d571
("bus: Make remove callback return void").
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-11-06 16:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-06 14:57 Dawei Li
2022-11-06 16:54 ` Uwe Kleine-König [this message]
2022-11-07 8:20 ` Lee Jones
2022-11-07 10:32 ` Hans de Goede
2022-11-07 18:33 ` Dmitry Torokhov
2022-11-09 13:45 ` Greg KH
2022-11-09 14:36 ` Andy Shevchenko
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=20221106165422.nzfw36oj5q2splnc@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=andy@infradead.org \
--cc=arnd@arndb.de \
--cc=bleung@chromium.org \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=dvhart@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=jgross@suse.com \
--cc=kronos.it@gmail.com \
--cc=kys@microsoft.com \
--cc=lee@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=set_pte_at@outlook.com \
--cc=sujith.thomas@intel.com \
--cc=vithampi@vmware.com \
--cc=wim@linux-watchdog.org \
/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
all inboxes | Powered by JetHome®