Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5267750pxv; Tue, 6 Jul 2021 22:59:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1LEBMNSW6FAU0UAyLglkQh79ThB7ykrLaYRGacb5HsIzeET0sbAW5rKzOtzL5nEgRjeNY X-Received: by 2002:a05:6402:6:: with SMTP id d6mr15622762edu.236.1625637543114; Tue, 06 Jul 2021 22:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625637543; cv=none; d=google.com; s=arc-20160816; b=c1bK7uTG79/RZ4fS1Wh02o0Uj9rJbu/43ihZV20NXq58aoHvFVD+Bjd5ypEBNkb1Y8 UDOE+Iz64U2fJYymK6pLHnEuID6FmT8wBV1/MYqpKl95/6PiKRlXSYHN74tPfj7klP9Y Df1W1zL63w+91tQp53TijPJijx0GWX8XGH6SaRcACUdVB0v/gSveNTriW4Ubd3YOh0zz 7nGe1rcUPTrLVGhZC889ZaoH1hD6pbLYuzj+7X/qiIlFfM/dLXqGYxZ05/9WcwX751O4 j/2iTmlXvSfUn1btrwPx2ied0j2NvAECWxe0+kJNenazkHCmC8MF7/XXAOhtW+5264pj gnIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=UEHqcZCN+036Y6L/8CVbkNZL/Q4LGZvH4yH5VWcuN0g=; b=TedbxEB+2Wj9W/ZHKcnK4l/xBxaKnIrOV+8TPZaFlPdSdjBEgf0AWRwO7/KQXr629F SgBqy4iSI4or9+JtmmnxxCofOpnwY6jg85nMx0EenLpk/9ETzfEYT7HTfxudzeTh3PHb Pbb9MJQfzVCCrWGrsaRoPw4uMfxKd9W7uyy92kF02Z4pUSAz/AtGWuzkjp5IZocAtz3r yOgHMQJTk/XIgHT0wf+7DxyTIJCOjL2nj0uVtzSMt6ufimbIWFMZfvF7n8SdR/cv2OJk GHpFzSKiO1S7f6CtNHuieIa7CKfCwPV/GuG6IEEQd4GrIckqab+itOXvJkOklmQA07fy hBxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si16033711ejj.366.2021.07.06.22.58.40; Tue, 06 Jul 2021 22:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230207AbhGGGAN convert rfc822-to-8bit (ORCPT + 99 others); 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/