linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	linux1394-devel@lists.sourceforge.net
Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void
Date: Wed, 7 Jul 2021 07:57:03 +0200	[thread overview]
Message-ID: <20210707075703.32908b84@kant> (raw)
In-Reply-To: <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de>

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/

  parent reply	other threads:[~2021-07-07  5:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 15:47 [PATCH v2 0/4] bus: Make remove callback return void Uwe Kleine-König
2021-07-06 15:48 ` [PATCH v2 1/4] s390/cio: Make struct css_driver::remove " Uwe Kleine-König
2021-07-06 15:58   ` Cornelia Huck
2021-07-06 16:05     ` Uwe Kleine-König
2021-07-07 11:28       ` Vineeth Vijayan
2021-07-07 14:34         ` Uwe Kleine-König
2021-07-12 12:13           ` Heiko Carstens
2021-07-06 15:48 ` [PATCH v2 2/4] s390/ccwgroup: Drop if with an always false condition Uwe Kleine-König
2021-07-06 16:04   ` Cornelia Huck
2021-07-07 11:15   ` Vineeth Vijayan
2021-07-06 15:48 ` [PATCH v2 3/4] s390/scm: Make struct scm_driver::remove return void Uwe Kleine-König
2021-07-06 16:05   ` Cornelia Huck
2021-07-07 11:32   ` Vineeth Vijayan
2021-07-06 15:48 ` [PATCH v2 4/4] bus: Make remove callback " Uwe Kleine-König
2021-07-06 16:09   ` Cornelia Huck
2021-07-06 16:44   ` Rafael J. Wysocki
2021-07-06 18:15   ` Srinivas Pandruvada
2021-07-06 18:32   ` Uwe Kleine-König
2021-07-06 18:51   ` Dan Williams
2021-07-06 21:37   ` William Breathitt Gray
2021-07-07  5:57   ` Stefan Richter [this message]
2021-07-07 14:24   ` Benjamin Tissoires
2021-07-07 21:51   ` Thorsten Scherer
2021-07-08 12:41   ` Ulf Hansson
2021-07-15 12:41   ` Wei Liu
2021-07-15 13:02   ` Thomas Bogendoerfer
2021-07-08  2:08 ` [PATCH v2 0/4] " Sven Van Asbroeck
2021-07-08  5:38   ` Uwe Kleine-König

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=20210707075703.32908b84@kant \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 NNTP newsgroup(s).