From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C977DC07E95 for ; Wed, 7 Jul 2021 05:57:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9174461C6D for ; Wed, 7 Jul 2021 05:57:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230247AbhGGGAN convert rfc822-to-8bit (ORCPT ); Wed, 7 Jul 2021 02:00:13 -0400 Received: from einhorn.in-berlin.de ([192.109.42.8]:34309 "EHLO einhorn-mail-out.in-berlin.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230192AbhGGGAN (ORCPT ); Wed, 7 Jul 2021 02:00:13 -0400 X-Envelope-From: stefanr@s5r6.in-berlin.de Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id 1675v4nD012588 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 7 Jul 2021 07:57:04 +0200 Date: Wed, 7 Jul 2021 07:57:03 +0200 From: Stefan Richter To: Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net Subject: Re: [PATCH v2 4/4] bus: Make remove callback return void Message-ID: <20210707075703.32908b84@kant> In-Reply-To: <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> References: <20210706154803.1631813-1-u.kleine-koenig@pengutronix.de> <20210706154803.1631813-5-u.kleine-koenig@pengutronix.de> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 (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/