lkml.org 
[lkml]   [2021]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] bus: Make remove callback return void
On Jul 06 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: Stefan Richter <stefanr@s5r6.in-berlin.de> (for drivers/firewire)

[...]
> drivers/firewire/core-device.c | 4 +---
[...]
> diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
> index 68216988391f..90ed8fdaba75 100644
> --- a/drivers/firewire/core-device.c
> +++ b/drivers/firewire/core-device.c
> @@ -187,14 +187,12 @@ static int fw_unit_probe(struct device *dev)
> return driver->probe(fw_unit(dev), unit_match(dev, dev->driver));
> }
>
> -static int fw_unit_remove(struct device *dev)
> +static void fw_unit_remove(struct device *dev)
> {
> struct fw_driver *driver =
> container_of(dev->driver, struct fw_driver, driver);
>
> driver->remove(fw_unit(dev));
> -
> - return 0;
> }
>
> static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
[...]
--
Stefan Richter
-======--=-= -=== --===
http://arcgraph.de/sr/

\
 
 \ /
  Last update: 2021-07-07 07:58    [W:0.157 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site