Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp1151322lko; Tue, 13 Jul 2021 18:13:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMg4UwgFfqdbVHGZmUVJPNRJDlezMhswAtkXcRt7/2qA8h38wi5goL1D4PllOpq5Fb0xaB X-Received: by 2002:a05:6402:193:: with SMTP id r19mr9754153edv.104.1626225225243; Tue, 13 Jul 2021 18:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626225225; cv=none; d=google.com; s=arc-20160816; b=Tbe0K+MuiKVR7g+Zv1YNxAjqd2OqMwBKru0/ZyVLSJPNYt+nf9Iki51dt+gaTTw3mc OfBGTnpRfXdIuLcdeYR/c/ZXWtx+Nk5igmNOcLSJIN9wnX69rTNDV/HJW903cUA83g4y uNA9juDwZJ+bOGDOGY0TeLlsc4XCft6pYPxD+F4CgrZprQNCkfsqbIkn3BiWs6J9FbaU WCfipjkrv8F3zhmmo1raDOqhgevjoKXYaMku71PA4Pmih/Uzns9VeP1CINoJyS263weo j7b7zPkuSU13EFMXei12E63x+s/ooWtHPbrNnXuydlmG6huxBjSnEbv3NJh2BlXxJBf0 PMbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=EsgNCmQMp0sVxZo1hnQjnHJ7usJKDbWwUiB8a7dFg/k=; b=hvZvtjWocD8qGkK88qm8p06Gni/KKyxK9LCGG7PghhwWz2s56XGDk/XYZW3TSkMV0O sWz/QfyW/lNoxbFH11Ya+Xmh2GYcAf7QE8mHXMziGsyltd82i/5+dlNe1QrzaME9EyNq A6ho7C9Kcm0M9O6tb3qXBJ1dXwtpZOVkJJX8UIYNhPDnqft/Zb41DCFLBTiGusVK68sX 88dNecGmyNdV29kwFxJhyGhA6kje8KD55LSwIq21UtjExy88mmMxsgJCThXrYMyrGLvQ Rnebslm5mKKHjzMBWn7CQH0t/cekNHLSE2e2eY5IeUxF6Un9R76FHpYtkI719NYWEeTE CuwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=YE4H9V3y; 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 n2si714986ejl.693.2021.07.13.18.13.23; Tue, 13 Jul 2021 18:13:45 -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; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=YE4H9V3y; 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 S237231AbhGNBPF (ORCPT + 99 others); Tue, 13 Jul 2021 21:15:05 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:33625 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237198AbhGNBPE (ORCPT ); Tue, 13 Jul 2021 21:15:04 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 922075C01A3; Tue, 13 Jul 2021 21:12:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 13 Jul 2021 21:12:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=EsgNCm QMp0sVxZo1hnQjnHJ7usJKDbWwUiB8a7dFg/k=; b=YE4H9V3yEq6ZVue1ho6gt9 Y/Ewm5PRZazkDeXYptHAy9Sb8FZcDSFggs/ZE2kLiM1R73iloLqQVrvKWF/9vAi+ aoYWf+T82uXlnYWLuPL5+CwCc49EGEYe+OGRJVoZKOVzE6dOOb9KibwhPAZOkRnP SUKjEK/ygMtA1wBBUaIy/qe/vr4AhFcEx2H66P5dtFyTd63yXagN9aHkOI/KOnbq SBD4XseVpkvHEKIqxjc2cOHf9W+0pAAn8FUql/r1G+/vaUD1C+zzBQEiPms69/vI w2atrxDp3xOtX1owEZwnRusQWUKVR6JN3j4K2Srh7ot3zpwKXzax+N4eO+Swx+cg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejgdefiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffujgfkfhggtgesmhdtreertd dtjeenucfhrhhomhephfhinhhnucfvhhgrihhnuceofhhthhgrihhnsehlihhnuhigqdhm ieekkhdrohhrgheqnecuggftrfgrthhtvghrnhepfeffjeeigfehveehfeevhfetgefgie ejieeviefhffffudfgfeekleffhffghedvnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepfhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Jul 2021 21:12:11 -0400 (EDT) Date: Wed, 14 Jul 2021 11:12:05 +1000 (AEST) From: Finn Thain To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 5/5] bus: Make remove callback return void In-Reply-To: <20210713193522.1770306-6-u.kleine-koenig@pengutronix.de> Message-ID: <1a4ba24-8bab-47b8-b25d-cc31ce16ca1f@linux-m68k.org> References: <20210713193522.1770306-1-u.kleine-koenig@pengutronix.de> <20210713193522.1770306-6-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463811774-790401653-1626225063=:6" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811774-790401653-1626225063=:6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 13 Jul 2021, Uwe Kleine-K=C3=B6nig wrote: > The driver core ignores the return value of this callback because there > is only little it can do when a device disappears. >=20 > 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. >=20 > 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. >=20 =2E.. > diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c > index ad3d17c42e23..d9d04f27f89b 100644 > --- a/drivers/nubus/bus.c > +++ b/drivers/nubus/bus.c > @@ -29,14 +29,12 @@ static int nubus_device_probe(struct device *dev) > =09return err; > } > =20 > -static int nubus_device_remove(struct device *dev) > +static void nubus_device_remove(struct device *dev) > { > =09struct nubus_driver *ndrv =3D to_nubus_driver(dev->driver); > -=09int err =3D -ENODEV; > =20 > =09if (dev->driver && ndrv->remove) > -=09=09err =3D ndrv->remove(to_nubus_board(dev)); > -=09return err; > +=09=09ndrv->remove(to_nubus_board(dev)); > } > =20 > struct bus_type nubus_bus_type =3D { Acked-by: Finn Thain ---1463811774-790401653-1626225063=:6--