Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp679065pxy; Sat, 31 Jul 2021 22:10:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQgPNVacJucdB1W4bJYoyQuVPiT1Onn+6XGv5EKQYSaFi40D7k/BVPqyjKMFnbvzBtJNC2 X-Received: by 2002:a05:6e02:13d3:: with SMTP id v19mr6775862ilj.167.1627794626715; Sat, 31 Jul 2021 22:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627794626; cv=none; d=google.com; s=arc-20160816; b=IzAWn5pRG/OE/xZaLZB8VNQPpIjAXcDI7wJ1Nwhbypl98xRY7jjuZJ5oAKqxjg6hT9 Ef+ZqFypSPpStjdT02kHLjCw0LnkEYhojlgeOXXtV4Dj83s90mk9KFgttNG4kZRnkPgB R97iw0R/q/I3vvhxywwEd0lzxbe8LLpbSKZ+YAYlNblvrdTs5VoGkZEBj+KgH+GrgZkm Yxk6KVs/o3EJ52ahQBAkflNO4aXM+cfhwUO2Vw59UQdG0d9trqwF4e2AgEqld1MKM8PN J+sTUdHWsf620+dUqrj+gHPLk976WqzGd/BWcjGSrqhmSDtnF0wh0N2AOZq0Rjn19rD2 BG7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-id:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ixXBiF5JMgE/jUfE+hpqY4FdeRq+epIUTn/nmvE6jJ0=; b=OJukbYk/FtOwLCv9CyuPqUGDHBhOtLK8gAbXC9LZbpjY0T8Wf5C4LvIVCPBy+Qt+GE wNeTCmJyq2kmNxk8KBgkAkgNgs32XrvclRdx4KmPMui2mE7vZkfbMTsDSrMn3kDlZplF CHRLnmuK7Miunp2fimAj8vuN0pKVvDOWTOHFRWGZpVzM+hSbG+awhadTVmxWqoZYIRnH e1uh4U28tD4RtQJRpQ1Zwy49/ygTtWIzk6GKNPrxkyq8EL/blfB8HJmzw+tsLeKkLUu/ 4yRrKmpDIlRAvB7wazqgFt0GlM29RfRSHrid006Z3/q0A9Uy/YfBX5VA+D0MROC1asOp DiSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=WebSY7C9; 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 i187si7558007iof.20.2021.07.31.22.09.45; Sat, 31 Jul 2021 22:10:26 -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=WebSY7C9; 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 S229451AbhHAFEW (ORCPT + 99 others); Sun, 1 Aug 2021 01:04:22 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:51687 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbhHAFEV (ORCPT ); Sun, 1 Aug 2021 01:04:21 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8DF235C00A7; Sun, 1 Aug 2021 01:04:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 01 Aug 2021 01:04:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-id: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=ixXBiF5JMgE/jUfE+hpqY4FdeRq+epIUTn/nmvE6jJ0=; b=WebSY7C9 FAHKPgJvFoR1uu08jVMVfCqNSRNPXqlT1nvgNEPi+wugD0d6B8/2/BCeXUhrvrmv fjxtRAzVJH0iQFnekwdUPGlQ/MzF0JGatyDJM3hprQCSMowHC178lMG9vCIjKJfi lJ2hNJSgWE1agkuC7eVuVq8y+7TeWpI1AakokQ6IYBoJvA80tMPC5xQ5tdIsH5Qb KsbSrigE/nxjIrk6Y8i3mbPikRICNfmWrjsHX3VAKDVmzgqGpXv3+sqEMRkx0wad A0UtO4vLjRvdrKH4OSG/TRGueUJdLAwV+1HQnmzbkHMbwDd5z7cm+TWyT2udqrbw ZTwKlUzD03uRIA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrheekgdeglecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvufgjkfhfgggtsehmtderredttdejnecuhfhrohhmpefhihhnnhcuvfhh rghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtth gvrhhnpeefffejiefgheevheefvefhteeggfeijeeiveeihfffffdugfefkeelfffhgfeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfth hhrghinheslhhinhhugidqmheikehkrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 1 Aug 2021 01:04:08 -0400 (EDT) Date: Sun, 1 Aug 2021 15:04:03 +1000 (AEST) From: Finn Thain To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-m68k@lists.linux-m68k.org Subject: Re: [PATCH v2 1/4] nubus: Simplify check in remove callback In-Reply-To: <20210730191035.1455248-2-u.kleine-koenig@pengutronix.de> Message-ID: References: <20210730191035.1455248-1-u.kleine-koenig@pengutronix.de> <20210730191035.1455248-2-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="-1463811774-1980221512-1627794129=:27" Content-ID: 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-1980221512-1627794129=:27 Content-Type: text/plain; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: <422deda6-11f-a1c8-5510-7123c82751b8@nippy.intranet> On Fri, 30 Jul 2021, Uwe Kleine-K=C3=B6nig wrote: > The driver core only calls a remove callback when the device was > successfully bound (aka probed) before. So dev->driver is never NULL and > the respective check can just be dropped. >=20 > Signed-off-by: Uwe Kleine-K=C3=B6nig Acked-by: Finn Thain BTW, aside from nubus, zorro and superhyway you can find the same pattern in many other busses. You may want to patch the following methods too. acpi_device_remove apr_device_remove ccwgroup_remove gio_device_remove hid_device_remove=20 ibmebus_bus_device_remove macio_device_remove memstick_device_remove ntb_remove pci_device_remove pnp_device_remove ps3_system_bus_remove rio_device_remove slim_device_remove soundbus_device_remove ssb_device_remove tifm_device_remove vdpa_dev_remove vmbus_remove > --- > drivers/nubus/bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c > index d9d04f27f89b..17fad660032c 100644 > --- a/drivers/nubus/bus.c > +++ b/drivers/nubus/bus.c > @@ -33,7 +33,7 @@ static void nubus_device_remove(struct device *dev) > { > =09struct nubus_driver *ndrv =3D to_nubus_driver(dev->driver); > =20 > -=09if (dev->driver && ndrv->remove) > +=09if (ndrv->remove) > =09=09ndrv->remove(to_nubus_board(dev)); > } > =20 >=20 ---1463811774-1980221512-1627794129=:27--