[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210714102529.ehwquc2s2qlbccyg@bogus>
Date: Wed, 14 Jul 2021 11:25:29 +0100
From: Sudeep Holla <sudeep.holla@....com>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
kernel@...gutronix.de, Sudeep Holla <sudeep.holla@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Alexandre Bounine <alex.bou9@...il.com>,
Alex Dubov <oakad@...oo.com>, Alex Elder <elder@...nel.org>,
Alex Williamson <alex.williamson@...hat.com>,
Alison Schofield <alison.schofield@...el.com>,
Allen Hubbe <allenbh@...il.com>,
Andreas Noever <andreas.noever@...il.com>,
Andy Gross <agross@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Ben Widawsky <ben.widawsky@...el.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Bodo Stroesser <bostroesser@...il.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Chen-Yu Tsai <wens@...e.org>,
Christian Borntraeger <borntraeger@...ibm.com>,
Cornelia Huck <cohuck@...hat.com>,
Cristian Marussi <cristian.marussi@....com>,
Dan Williams <dan.j.williams@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
"David S. Miller" <davem@...emloft.net>,
David Woodhouse <dwmw@...zon.co.uk>,
Dexuan Cui <decui@...rosoft.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Finn Thain <fthain@...ux-m68k.org>,
Florian Fainelli <f.fainelli@...il.com>,
Frank Li <lznuaa@...il.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Geoff Levand <geoff@...radead.org>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Hannes Reinecke <hare@...e.de>,
Hans de Goede <hdegoede@...hat.com>,
Harald Freudenberger <freude@...ux.ibm.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Helge Deller <deller@....de>, Ira Weiny <ira.weiny@...el.com>,
Jakub Kicinski <kuba@...nel.org>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
Jaroslav Kysela <perex@...ex.cz>,
Jason Wang <jasowang@...hat.com>,
Jens Taprogge <jens.taprogge@...rogge.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Jiri Kosina <jikos@...nel.org>,
Jiri Slaby <jirislaby@...nel.org>,
Joey Pabalan <jpabalanb@...il.com>,
Johan Hovold <johan@...nel.org>,
Johannes Berg <johannes@...solutions.net>,
Johannes Thumshirn <morbidrsa@...il.com>,
Jon Mason <jdmason@...zu.us>, Juergen Gross <jgross@...e.com>,
Julien Grall <jgrall@...zon.com>,
Kai-Heng Feng <kai.heng.feng@...onical.com>,
Kirti Wankhede <kwankhede@...dia.com>,
Kishon Vijay Abraham I <kishon@...com>,
Krzysztof Wilczyński <kw@...ux.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Lee Jones <lee.jones@...aro.org>, Len Brown <lenb@...nel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Manohar Vanga <manohar.vanga@...il.com>,
Marc Zyngier <maz@...nel.org>, Mark Brown <broonie@...nel.org>,
Mark Gross <mgross@...ux.intel.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Martyn Welch <martyn@...chs.me.uk>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Matt Porter <mporter@...nel.crashing.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Maxime Ripard <mripard@...nel.org>,
Maximilian Luz <luzmaximilian@...il.com>,
Maxim Levitsky <maximlevitsky@...il.com>,
Michael Buesch <m@...s.ch>,
Michael Ellerman <mpe@...erman.id.au>,
Michael Jamet <michael.jamet@...el.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Mike Christie <michael.christie@...cle.com>,
Moritz Fischer <mdf@...nel.org>,
Ohad Ben-Cohen <ohad@...ery.com>,
Pali Rohár <pali@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Peter Oberparleiter <oberpar@...ux.ibm.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Rafał Miłecki <zajec5@...il.com>,
Rich Felker <dalias@...c.org>,
Rikard Falkeborn <rikard.falkeborn@...il.com>,
Rob Herring <robh@...nel.org>,
Russell King <linux@...linux.org.uk>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Samuel Holland <samuel@...lland.org>,
Samuel Iglesias Gonsalvez <siglesias@...lia.com>,
SeongJae Park <sjpark@...zon.de>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Stefan Richter <stefanr@...6.in-berlin.de>,
Stephen Boyd <sboyd@...nel.org>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Sven Van Asbroeck <TheSven73@...il.com>,
Takashi Iwai <tiwai@...e.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Thorsten Scherer <t.scherer@...elmann.de>,
Tomas Winkler <tomas.winkler@...el.com>,
Tom Rix <trix@...hat.com>,
Tyrel Datwyler <tyreld@...ux.ibm.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Vasily Gorbik <gor@...ux.ibm.com>,
Vineeth Vijayan <vneethv@...ux.ibm.com>,
Vinod Koul <vkoul@...nel.org>,
Vishal Verma <vishal.l.verma@...el.com>,
Wei Liu <wei.liu@...nel.org>,
William Breathitt Gray <vilhelm.gray@...il.com>,
Wolfram Sang <wsa@...nel.org>, Wu Hao <hao.wu@...el.com>,
Yehezkel Bernat <YehezkelShB@...il.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
YueHaibing <yuehaibing@...wei.com>,
Yufen Yu <yuyufen@...wei.com>, alsa-devel@...a-project.org,
dmaengine@...r.kernel.org, greybus-dev@...ts.linaro.org,
industrypack-devel@...ts.sourceforge.net, kvm@...r.kernel.org,
linux1394-devel@...ts.sourceforge.net, linux-acpi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, linux-cxl@...r.kernel.org,
linux-fpga@...r.kernel.org, linux-hyperv@...r.kernel.org,
linux-i2c@...r.kernel.org, linux-i3c@...ts.infradead.org,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-m68k@...ts.linux-m68k.org, linux-media@...r.kernel.org,
linux-mips@...r.kernel.org, linux-mmc@...r.kernel.org,
linux-ntb@...glegroups.com, linux-parisc@...r.kernel.org,
linux-pci@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-remoteproc@...r.kernel.org, linux-s390@...r.kernel.org,
linux-scsi@...r.kernel.org, linux-serial@...r.kernel.org,
linux-sh@...r.kernel.org, linux-spi@...r.kernel.org,
linux-staging@...ts.linux.dev, linux-sunxi@...ts.linux.dev,
linux-usb@...r.kernel.org, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, nvdimm@...ts.linux.dev,
platform-driver-x86@...r.kernel.org, sparclinux@...r.kernel.org,
target-devel@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
xen-devel@...ts.xenproject.org,
Johannes Thumshirn <jth@...nel.org>,
"Rafael J . Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v4 5/5] bus: Make remove callback return void
On Tue, Jul 13, 2021 at 09:35:22PM +0200, Uwe Kleine-König wrote:
> The driver core ignores the return value of this callback because there
> is only little it can do when a device disappears.
>
> This is the final bit of a long lasting cleanup quest where several
> buses were converted to also return void from their remove callback.
> Additionally some resource leaks were fixed that were caused by drivers
> returning an error code in the expectation that the driver won't go
> away.
>
> With struct bus_type::remove returning void it's prevented that newly
> implemented buses return an ignored error code and so don't anticipate
> wrong expectations for driver authors.
>
[...]
> diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
> index 784cf0027da3..2682c3df651c 100644
> --- a/drivers/firmware/arm_scmi/bus.c
> +++ b/drivers/firmware/arm_scmi/bus.c
> @@ -116,15 +116,13 @@ static int scmi_dev_probe(struct device *dev)
> return scmi_drv->probe(scmi_dev);
> }
>
> -static int scmi_dev_remove(struct device *dev)
> +static void scmi_dev_remove(struct device *dev)
> {
> struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver);
> struct scmi_device *scmi_dev = to_scmi_dev(dev);
>
> if (scmi_drv->remove)
> scmi_drv->remove(scmi_dev);
> -
> - return 0;
> }
>
> static struct bus_type scmi_bus_type = {
Acked-by: Sudeep Holla <sudeep.holla@....com>
--
Regards,
Sudeep
Powered by blists - more mailing lists