Message ID | 20210706154803.1631813-1-u.kleine-koenig@pengutronix.de |
---|---|
Headers | show |
Series | bus: Make remove callback return void | expand |
On Tue, Jul 06 2021, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> 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. > > Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts) > Acked-by: Mark Brown <broonie@kernel.org> > Acked-by: Chen-Yu Tsai <wens@csie.org> (for drivers/bus/sunxi-rsb.c) > Acked-by: Pali Rohár <pali@kernel.org> > Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for drivers/media) > Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform) > Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> > Acked-By: Vinod Koul <vkoul@kernel.org> > Acked-by: Juergen Gross <jgross@suse.com> (For Xen) > Acked-by: Lee Jones <lee.jones@linaro.org> (For drivers/mfd) > Acked-by: Johannes Thumshirn <jth@kernel.org> (For drivers/mcb) > Acked-by: Johan Hovold <johan@kernel.org> > Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For drivers/slimbus) > Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For drivers/vfio) > Acked-by: Maximilian Luz <luzmaximilian@gmail.com> > Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec) > Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack) > Reviewed-by: Tom Rix <trix@redhat.com> (For fpga) > Acked-by: Geoff Levand <geoff@infradead.org> (For ps3) > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- > > drivers/s390/cio/ccwgroup.c | 4 +--- > drivers/s390/cio/css.c | 4 +--- > drivers/s390/cio/device.c | 4 +--- > drivers/s390/cio/scm.c | 4 +--- > drivers/s390/crypto/ap_bus.c | 4 +--- > drivers/vfio/mdev/mdev_driver.c | 4 +--- For drivers/s390 and drivers/vfio: Reviewed-by: Cornelia Huck <cohuck@redhat.com>
On Tue 06 Jul 10:48 CDT 2021, 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. > Thanks for doing this! Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> (rpmsg and apr) [..] > diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c > index c1404d3dae2c..7f6fac618ab2 100644 > --- a/drivers/rpmsg/rpmsg_core.c > +++ b/drivers/rpmsg/rpmsg_core.c > @@ -530,7 +530,7 @@ static int rpmsg_dev_probe(struct device *dev) > return err; > } > > -static int rpmsg_dev_remove(struct device *dev) > +static void rpmsg_dev_remove(struct device *dev) > { > struct rpmsg_device *rpdev = to_rpmsg_device(dev); > struct rpmsg_driver *rpdrv = to_rpmsg_driver(rpdev->dev.driver); > @@ -546,8 +546,6 @@ static int rpmsg_dev_remove(struct device *dev) > > if (rpdev->ept) > rpmsg_destroy_ept(rpdev->ept); > - > - return err; This leaves err assigned but never used, but I don't mind following up with a patch cleaning that up after this has landed. > } > > static struct bus_type rpmsg_bus = { Regards, Bjorn
Hello, v1 was acked by some more after I stopped looking in my mailbox while preparing v2: On Tue, Jul 06, 2021 at 05:48:03PM +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. > > Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts) > Acked-by: Mark Brown <broonie@kernel.org> > Acked-by: Chen-Yu Tsai <wens@csie.org> (for drivers/bus/sunxi-rsb.c) > Acked-by: Pali Rohár <pali@kernel.org> > Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for drivers/media) > Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform) > Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> > Acked-By: Vinod Koul <vkoul@kernel.org> > Acked-by: Juergen Gross <jgross@suse.com> (For Xen) > Acked-by: Lee Jones <lee.jones@linaro.org> (For drivers/mfd) > Acked-by: Johannes Thumshirn <jth@kernel.org> (For drivers/mcb) > Acked-by: Johan Hovold <johan@kernel.org> > Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For drivers/slimbus) > Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For drivers/vfio) > Acked-by: Maximilian Luz <luzmaximilian@gmail.com> > Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec) > Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack) > Reviewed-by: Tom Rix <trix@redhat.com> (For fpga) > Acked-by: Geoff Levand <geoff@infradead.org> (For ps3) Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com> (For thunderbolt) Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> (For intel_th) Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> (For pcmcia) > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Best regards Uwe
On Tue, Jul 6, 2021 at 8:51 AM Uwe Kleine-König <u.kleine-koenig@pengutronix.de> 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. > > drivers/cxl/core.c | 3 +-- > drivers/dax/bus.c | 4 +--- > drivers/nvdimm/bus.c | 3 +-- For CXL, DAX, and NVDIMM Acked-by: Dan Williams <dan.j.williams@intel.com>
On Tue, Jul 06, 2021 at 05:48:03PM +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. > > Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> (For ARM, Amba and related parts) > Acked-by: Mark Brown <broonie@kernel.org> > Acked-by: Chen-Yu Tsai <wens@csie.org> (for drivers/bus/sunxi-rsb.c) > Acked-by: Pali Rohár <pali@kernel.org> > Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org> (for drivers/media) > Acked-by: Hans de Goede <hdegoede@redhat.com> (For drivers/platform) > Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> > Acked-By: Vinod Koul <vkoul@kernel.org> > Acked-by: Juergen Gross <jgross@suse.com> (For Xen) > Acked-by: Lee Jones <lee.jones@linaro.org> (For drivers/mfd) > Acked-by: Johannes Thumshirn <jth@kernel.org> (For drivers/mcb) > Acked-by: Johan Hovold <johan@kernel.org> > Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> (For drivers/slimbus) > Acked-by: Kirti Wankhede <kwankhede@nvidia.com> (For drivers/vfio) > Acked-by: Maximilian Luz <luzmaximilian@gmail.com> > Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> (For ulpi and typec) > Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> (For ipack) > Reviewed-by: Tom Rix <trix@redhat.com> (For fpga) > Acked-by: Geoff Levand <geoff@infradead.org> (For ps3) > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- > drivers/base/isa.c | 4 +--- Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
On Tue, Jul 06, 2021 at 05:48:03PM +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. [...] > drivers/siox/siox-core.c | 4 +--- (For drivers/siox) Acked-by: Thorsten Scherer <t.scherer@eckelmann.de> Best regards Thorsten -- Thorsten Scherer | Eckelmann AG | www.eckelmann.de |
On Tue, Jul 6, 2021 at 11:50 AM Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote: > > drivers/staging/fieldbus/anybuss/host.c | 4 +--- Awesome ! Acked-by: Sven Van Asbroeck <TheSven73@gmail.com>