From patchwork Fri Nov 12 14:53:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 12616897 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 783AAC433EF for ; Fri, 12 Nov 2021 14:54:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 523A661075 for ; Fri, 12 Nov 2021 14:54:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232403AbhKLO4z (ORCPT ); Fri, 12 Nov 2021 09:56:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231553AbhKLO4y (ORCPT ); Fri, 12 Nov 2021 09:56:54 -0500 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 7D8E1C061766 for ; Fri, 12 Nov 2021 06:54:03 -0800 (PST) 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 1mlXwD-0001aA-OZ; Fri, 12 Nov 2021 15:53:57 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mlXwB-0009Zf-Sz; Fri, 12 Nov 2021 15:53:55 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mlXwB-0001QS-17; Fri, 12 Nov 2021 15:53:55 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean Cc: Jakub Kicinski , "David S. Miller" , kernel@pengutronix.de, netdev@vger.kernel.org Subject: [PATCH net-next] net: dsa: vsc73xxx: Make vsc73xx_remove() return void Date: Fri, 12 Nov 2021 15:53:52 +0100 Message-Id: <20211112145352.1125971-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Patch-Hashes: v=1; h=sha256; i=eu5lpI142438jSBFNGP4+xKeiLnKVvgxom/YjY+Unis=; m=RgdKUNZ4EmOBm5+JEA0/hy6eq01I+9XOcnBscgz91u8=; p=76VmQKWaksssuoIDXNJZgtpGwNXvTphGh9SX0rYbdic=; g=98cfe0fc15fa33be5087a62f98100c54ae0f6d5a X-Patch-Sig: m=pgp; i=u.kleine-koenig@pengutronix.de; s=0x0D2511F322BFAB1C1580266BE2DCDD9132669BD6; b=iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmGOf/sACgkQwfwUeK3K7Akzawf+O6i Rgci3Ix26a92SC6UTdY+ai958pKaA+GhZJq21KnqKc2ZsLyRDBZ3MQDhzyQKGhmPL8NbLlXURoOjo +qY6OUbs2PRhDYgLwFb07iKA8FglOOKNEFlLFJxUoiipIY97kiM5YCXmqKKNlva6wr8N284gtL6Ad f8/bGiBIXpIZ1GUO57oEliex4VjNbzkwkraa6x9RC3T8hB82ZmBzdgc700QvD+jiHMnZs1GxNQUb/ GOBz4+85irMUdRcM7/Y+XYADSMlWMDzz16Ua2QTlQYcwpkhDLv9JmpgxGEMVaNu+8KWgmObXfOtEF X4gQgsEmF/WMieF7kssY/VVl28HP0Uw== 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: netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org vsc73xx_remove() returns zero unconditionally and no caller checks the returned value. So convert the function to return no value. Signed-off-by: Uwe Kleine-König Reviewed-by: Vladimir Oltean --- Hello, this is the successor of a patch I sent earlier[1], only doing the safe and undisputed part. Best regards Uwe [1] net: dsa: Some cleanups in remove code https://lore.kernel.org/r/20211109113921.1020311-1-u.kleine-koenig@pengutronix.de drivers/net/dsa/vitesse-vsc73xx-core.c | 4 +--- drivers/net/dsa/vitesse-vsc73xx.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) base-commit: 5833291ab6de9c3e2374336b51c814e515e8f3a5 diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index a4b1447ff055..4c18f619ec02 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -1216,12 +1216,10 @@ int vsc73xx_probe(struct vsc73xx *vsc) } EXPORT_SYMBOL(vsc73xx_probe); -int vsc73xx_remove(struct vsc73xx *vsc) +void vsc73xx_remove(struct vsc73xx *vsc) { dsa_unregister_switch(vsc->ds); gpiod_set_value(vsc->reset, 1); - - return 0; } EXPORT_SYMBOL(vsc73xx_remove); diff --git a/drivers/net/dsa/vitesse-vsc73xx.h b/drivers/net/dsa/vitesse-vsc73xx.h index 30b951504e65..30b1f0a36566 100644 --- a/drivers/net/dsa/vitesse-vsc73xx.h +++ b/drivers/net/dsa/vitesse-vsc73xx.h @@ -26,5 +26,5 @@ struct vsc73xx_ops { int vsc73xx_is_addr_valid(u8 block, u8 subblock); int vsc73xx_probe(struct vsc73xx *vsc); -int vsc73xx_remove(struct vsc73xx *vsc); +void vsc73xx_remove(struct vsc73xx *vsc); void vsc73xx_shutdown(struct vsc73xx *vsc);