Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4205191pxv; Tue, 27 Jul 2021 01:09:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3yA/s/gNfebKvgatUfRqk7UCbCtS10KbA4wfBQy+6xtBTNe6H+Y3AXugv34ZX7xl2HD9O X-Received: by 2002:a02:866a:: with SMTP id e97mr2359052jai.35.1627373399363; Tue, 27 Jul 2021 01:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627373399; cv=none; d=google.com; s=arc-20160816; b=CrOGiM/ZDcx6LkG1mZ2EBS0qH8kpKQJ3/hBZ0p+hRUyAf0TWvH0TQnJLdLKcM5W8Vb PbqD75/TYji/hPGN2Hb50kqWAfhcQWdr6pC6JyiHZ/qR8IkH/bQk9ZfYS44jJ3yoWBJm 5WFV9G78WMlhupXBNOvw3HTcuSktLLAfOcoZvRn2Ln97VfBnAEiy9Ob9SitQ8Jt4sKmj DMYxjkjTu86JyIo0/4iTZKHy4T2QhWOlFBzYSN/tD7ZZYiOPRvvL5TehDapJ8cwf3vxy MLiDozL9pGVdWTofQUGS3PVdoWoOsX04YI4cJIzVTtDhErQuthCxoSJiX8PzCgm/XCoX kdCg== 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:date:subject:cc:to:from; bh=3A/4Vlw2+F9EN3tBcfJTd61wC7TNILGfqq18fdUMsfY=; b=M2Y3M4+G6i/6a/geH3GAReZNFgK07m/BLICcf78PJcodMH0MBxQDd88+SNYiAukP+R uVVqMZsEG+S87IK8Bv4BDKeIhqcU4ErcY5OJ6pjrq2og5nAosXPJ6SktuGQOp9B4zaoF 3J+9tW3iERXfPMSEjctVWFPeC88/qDME7y+167Xuqc5Vq3DRShtH30tFW2WD5JYto00Z HXpbZskWsI4itTCZ11Q2Ga8mjlxGgjrrH4iPQE4ZgddLfLStKn/7Ed6HIDprfxv2FhqY 3yrRXU0Mjc5JLFtXkNnRHTMNHr/bbWrvElig82ojTbJj2EiRn1SM4jcQsuWdTr7Eibi0 dEIw== 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 n200si2859460iod.51.2021.07.27.01.09.48; Tue, 27 Jul 2021 01:09:59 -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 S235954AbhG0IJB (ORCPT + 99 others); Tue, 27 Jul 2021 04:09:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235859AbhG0II4 (ORCPT ); Tue, 27 Jul 2021 04:08:56 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 555C6C061757 for ; Tue, 27 Jul 2021 01:08:57 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8I8w-0006l7-Td; Tue, 27 Jul 2021 10:08:50 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m8I8u-0005sw-OZ; Tue, 27 Jul 2021 10:08:48 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1m8I8u-0004FF-NY; Tue, 27 Jul 2021 10:08:48 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de, "David S. Miller" , Jakub Kicinski , Finn Thain , Zhang Qilong , Christophe JAILLET , netdev@vger.kernel.org, linux-m68k@lists.linux-m68k.org Subject: [PATCH 2/5] nubus: Make struct nubus_driver::remove return void Date: Tue, 27 Jul 2021 10:08:37 +0200 Message-Id: <20210727080840.3550927-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210727080840.3550927-1-u.kleine-koenig@pengutronix.de> References: <20210727080840.3550927-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Patch-Hashes: v=1; h=sha256; i=JbhrniV2vNHdVwpfhOpuz1F2d1zKsTqaep2udV5D+Zk=; m=x7vdvVMVl5wHK8X7+wGP5Ra6XOkCM87tL3t7TNPTKwg=; p=M8x4NLAOxru7JT+Gx9SxrzxvaGHJbzJ2lK5/w5joXMM=; g=204cfdb681a19c4390cf9518bfe9e7d01d0688de X-Patch-Sig: m=pgp; i=u.kleine-koenig@pengutronix.de; s=0x0D2511F322BFAB1C1580266BE2DCDD9132669BD6; b=iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmD/vvcACgkQwfwUeK3K7AmgHwf/XLV x9JQnVHroRcWok/CacSA+YekHsCKimEcdiUsdyGeLGVlXSOzdeOWuT1gYG1xhIK7fJo+0Qn4o4PsL huvZUf0dbMWC7xiOh0N81NqP+1bbzfO+A81upPmoyBM7x+FS2Qk3t82mko0vWSJ6+mSIEGLfms9Sq p8aCbw8pakerSHRL1Dm5UFMteSgC1qtmhcLU5l0hPhTFoMWozLu+cpRjQ/FtuyeT83GfPkwRS0emx ODjTxs2FPcpS70Tfn69NucKBYqN5MKyu32ffUPYQf0G0GdmCPJEcRqickNlHeUVs1pvyshjtQ8OAi U0kOupcXhQhncFbDDmifKzU/e5JYapQ== Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The nubus core ignores the return value of the remove callback (in nubus_device_remove()) and all implementers return 0 anyway. So make it impossible for future drivers to return an unused error code by changing the remove prototype to return void. Signed-off-by: Uwe Kleine-König --- 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(-) diff --git a/drivers/net/ethernet/8390/mac8390.c b/drivers/net/ethernet/8390/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) return err; } -static int mac8390_device_remove(struct nubus_board *board) +static void mac8390_device_remove(struct nubus_board *board) { struct net_device *dev = nubus_get_drvdata(board); unregister_netdev(dev); free_netdev(dev); - return 0; } static struct nubus_driver mac8390_driver = { diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/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) return err; } -static int mac_sonic_nubus_remove(struct nubus_board *board) +static void mac_sonic_nubus_remove(struct nubus_board *board) { struct net_device *ndev = nubus_get_drvdata(board); struct sonic_local *lp = netdev_priv(ndev); @@ -613,8 +613,6 @@ static int mac_sonic_nubus_remove(struct nubus_board *board) SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode), lp->descriptors, lp->descriptors_laddr); free_netdev(ndev); - - return 0; } static struct nubus_driver mac_sonic_nubus_driver = { 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 { struct device_driver driver; int (*probe)(struct nubus_board *board); - int (*remove)(struct nubus_board *board); + void (*remove)(struct nubus_board *board); }; extern struct bus_type nubus_bus_type; -- 2.30.2