Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4257430pxv; Tue, 27 Jul 2021 02:51:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwt1KYJ2aO9WUeSokIGtidxwQE8sfhqKTvzrPlTATHaMFZ4aK38oV7t7P09Qeg2C2jkabz+ X-Received: by 2002:a17:907:b11:: with SMTP id h17mr11824276ejl.93.1627379493443; Tue, 27 Jul 2021 02:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627379493; cv=none; d=google.com; s=arc-20160816; b=zC53w1NF6teqI4+bT//EsXc0rqT0ekYmGqpDk/Jn+BG2m94INUMlmVt+OkCNg+pWZr M5h5RzxjMruJT+S2Pe91FmvHN/RRdYjwP1jPZzuUI4sUoQbNR75M1+nFqHFXRBOYUjfK ohSlWRoYYgurY9GDhSpiGSbi/Yl1CpxoVHvUeAyH+Eub5y6aURtRspc9Fkc0ddjGe4X0 e3nipxUKekg1EeAJO9BIvOKv3mJvfEwQR1mxrn3T6KphxeuS/XzvpA0xHyikhad9M9hj fXPsvepylmZJtLm8PgZ7SNus1OcVoaNn5mGHjW8Hs4lAGiHcngbTnvOGY0sNJVkkT63J c1gA== 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=gY4UTeqi38qVevjiESPFwl2OdxktiSNqxtqK3cUHOio=; b=QNEGaUFhDbd1JC8xesvpKiELK1IFWlkLBVpK1c5vAGiwt3piptfUVtXnsDIgTwAGBu g1EtznBMt+jnlOdKoywu4PDcHWmaxZ87pOApW5oDoZw2EkrI8dbuZRHMxsxSRZ84fGJ/ 7stPodPjfxGCKhEuWav2NQUY2i/4DNGe+wYUxDRlvbBftsV5jolTt2RaI5+xY3O4jnCG 42C9KcC9dWo/u+38P9Fekm99sB5Wqxk0BB5uTkDyezaijDvz0JJy/YjQxKaBcbZ9CFnk 0rMKv6pi/7FdaEWYm6LXR6i8wCWYf9L7DgVx1VWzlUco4JupZ5zUfUVu6EiTMA704kWy xn5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="jg4CBx/S"; 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 j20si2570617edt.37.2021.07.27.02.51.10; Tue, 27 Jul 2021 02:51:33 -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="jg4CBx/S"; 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 S236059AbhG0Jrf (ORCPT + 99 others); Tue, 27 Jul 2021 05:47:35 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:41227 "EHLO wout5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236074AbhG0Jrc (ORCPT ); Tue, 27 Jul 2021 05:47:32 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 5B661320079B; Tue, 27 Jul 2021 05:47:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 27 Jul 2021 05:47:31 -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=gY4UTeqi38qVevjiESPFwl2OdxktiSNqxtqK3cUHOio=; b=jg4CBx/S v3Z6dyIz7AY3SOHbLxOViTe+aFIbPs9XVnS8SgmAHpv92YZU1jpz7wzIZkImvpvT Cus/z9nBY2RzPBKRwUOnUCpC2MkkI+IO31VDZ40N0CESjtMBwfFO5CAnSPHWqiK/ LtS6jWVWtQ8rRF0/E01El5jfT9Jc04jMi/7Sg6tDsWoOsv6uDhCzpUMpGs1x4enO Fbr+cf3z2BZj6sArbsDzciN0szSqS3Ld+AvpORmoMDcjtW1uTonpr5T2Iznuq1BC 7eKRoF21ddpqzDZmVEmXRhYU7Kq81p6l/bH6BQkKYz5YuR2DW4AE0EwbITPfI2Dw BumtkbbMp2PeXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrgeejgdduhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvufgjkfhfgggtsehmtderredttdejnecuhfhrohhmpefhihhnnhcuvfhh rghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrghtth gvrhhnpeefffejiefgheevheefvefhteeggfeijeeiveeihfffffdugfefkeelfffhgfeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehfth hhrghinheslhhinhhugidqmheikehkrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Jul 2021 05:47:26 -0400 (EDT) Date: Tue, 27 Jul 2021 19:47:30 +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, "David S. Miller" , Jakub Kicinski , Zhang Qilong , Christophe JAILLET , netdev@vger.kernel.org, linux-m68k@lists.linux-m68k.org Subject: Re: [PATCH 2/5] nubus: Make struct nubus_driver::remove return void In-Reply-To: <20210727080840.3550927-3-u.kleine-koenig@pengutronix.de> Message-ID: <59bc4bf-7e8e-24be-5a7a-d165e6b73c32@linux-m68k.org> References: <20210727080840.3550927-1-u.kleine-koenig@pengutronix.de> <20210727080840.3550927-3-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="-1463811774-1321263043-1627379041=:27" Content-ID: <5c95884-21f4-a5b0-c5ad-12dc7ae6ffc8@nippy.intranet> 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-1321263043-1627379041=:27 Content-Type: text/plain; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: <4427256-e4b9-b8ee-c183-114bc2c5c61e@nippy.intranet> On Tue, 27 Jul 2021, Uwe Kleine-K=C3=B6nig wrote: > The nubus core ignores the return value of the remove callback (in > nubus_device_remove()) and all implementers return 0 anyway. >=20 > So make it impossible for future drivers to return an unused error code > by changing the remove prototype to return void. >=20 > Signed-off-by: Uwe Kleine-K=C3=B6nig Acked-by: Finn Thain > --- > drivers/net/ethernet/8390/mac8390.c | 3 +-- > drivers/net/ethernet/natsemi/macsonic.c | 4 +--- > include/linux/nubus.h | 2 +- > 3 files changed, 3 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/net/ethernet/8390/mac8390.c b/drivers/net/ethernet/8= 390/mac8390.c > index 9aac7119d382..91b04abfd687 100644 > --- a/drivers/net/ethernet/8390/mac8390.c > +++ b/drivers/net/ethernet/8390/mac8390.c > @@ -428,13 +428,12 @@ static int mac8390_device_probe(struct nubus_board = *board) > =09return err; > } > =20 > -static int mac8390_device_remove(struct nubus_board *board) > +static void mac8390_device_remove(struct nubus_board *board) > { > =09struct net_device *dev =3D nubus_get_drvdata(board); > =20 > =09unregister_netdev(dev); > =09free_netdev(dev); > -=09return 0; > } > =20 > static struct nubus_driver mac8390_driver =3D { > diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethern= et/natsemi/macsonic.c > index 2289e1fe3741..8709d700e15a 100644 > --- a/drivers/net/ethernet/natsemi/macsonic.c > +++ b/drivers/net/ethernet/natsemi/macsonic.c > @@ -603,7 +603,7 @@ static int mac_sonic_nubus_probe(struct nubus_board *= board) > =09return err; > } > =20 > -static int mac_sonic_nubus_remove(struct nubus_board *board) > +static void mac_sonic_nubus_remove(struct nubus_board *board) > { > =09struct net_device *ndev =3D nubus_get_drvdata(board); > =09struct sonic_local *lp =3D netdev_priv(ndev); > @@ -613,8 +613,6 @@ static int mac_sonic_nubus_remove(struct nubus_board = *board) > =09=09=09 SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode), > =09=09=09 lp->descriptors, lp->descriptors_laddr); > =09free_netdev(ndev); > - > -=09return 0; > } > =20 > static struct nubus_driver mac_sonic_nubus_driver =3D { > diff --git a/include/linux/nubus.h b/include/linux/nubus.h > index eba50b057f6f..392fc6c53e96 100644 > --- a/include/linux/nubus.h > +++ b/include/linux/nubus.h > @@ -86,7 +86,7 @@ extern struct list_head nubus_func_rsrcs; > struct nubus_driver { > =09struct device_driver driver; > =09int (*probe)(struct nubus_board *board); > -=09int (*remove)(struct nubus_board *board); > +=09void (*remove)(struct nubus_board *board); > }; > =20 > extern struct bus_type nubus_bus_type; >=20 ---1463811774-1321263043-1627379041=:27--