From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E915C43219 for ; Thu, 17 Nov 2022 14:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dRn8hTfcW9t/e5bb2waZkbulcLG/3QtUsk7VoHEtyUY=; b=m54stk0lINBjgz sxlPw9HlWlcJvCw3UViK+mr16d9VZxjgm8+SYUkhuFk1XHSDfF3+M68yw5B1ZFYHddIIntktUMUdo KYvrc/1IfTuO4J0/iBR3xdX1wJ11twwmCbmis628X0Uj69INDi8tMWQ9C/mQlwcMVAcoJxp31weMi DPHyAii+C2cxRjey3r/5M1S/Z+vZPbk2uwy3JdH+tlauwam89RvE/gaqno53xaAMjpfYPp9hkb4j4 2wj/lmHG9VhT1SNcMqpAjxBy/5tuB54IWRERngy4KUJyq8OjfxBCn9OKcoKusQIShu64kFGjGvvdg Pdrp/qJRDjpBOr+rzD+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovfZC-00Ehf0-9d; Thu, 17 Nov 2022 14:08:34 +0000 Received: from vps0.lunn.ch ([156.67.10.101]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovfZ9-00Ehdq-8Y for linux-arm-kernel@lists.infradead.org; Thu, 17 Nov 2022 14:08:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=zl6vDHK5lKkg1Jtxz5YOTlp7d4oAdqSycBm87+KayEM=; b=aNrcs+DAcnw62Li03+/U0OF33Y ombDLu03bhJM/J12bNnADscp058uDd87hTKHsNvNSwrlMJ32fXuZw/HQ8QJl8eWN5zvaK+wOfFOk5 panOMYbUsDlniK9SmKTVNfOysvnmzaeXNtF6bgwviRfqbqBAu43/Sp0Ica1wzJw3N/+s=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ovfYk-002hD3-0v; Thu, 17 Nov 2022 15:08:06 +0100 Date: Thu, 17 Nov 2022 15:08:06 +0100 From: Andrew Lunn To: Lu Wei Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, lars.povlsen@microchip.com, Steen.Hegelund@microchip.com, daniel.machon@microchip.com, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [patch net-next] net: microchip: sparx5: remove useless code in sparx5_qos_init() Message-ID: References: <20221117145820.2898968-1-luwei32@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221117145820.2898968-1-luwei32@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_060831_319202_F468A5C8 X-CRM114-Status: GOOD ( 16.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 17, 2022 at 10:58:20PM +0800, Lu Wei wrote: > There is no need to define variable ret, so remove it > and return sparx5_leak_groups_init() directly. > > Signed-off-by: Lu Wei > --- > drivers/net/ethernet/microchip/sparx5/sparx5_qos.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_qos.c b/drivers/net/ethernet/microchip/sparx5/sparx5_qos.c > index 1e79d0ef0cb8..2f39300d52cc 100644 > --- a/drivers/net/ethernet/microchip/sparx5/sparx5_qos.c > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_qos.c > @@ -383,13 +383,7 @@ static int sparx5_leak_groups_init(struct sparx5 *sparx5) > > int sparx5_qos_init(struct sparx5 *sparx5) > { > - int ret; > - > - ret = sparx5_leak_groups_init(sparx5); > - if (ret < 0) > - return ret; > - > - return 0; > + return sparx5_leak_groups_init(sparx5); > } Does sparx5_qos_init() even make sense given that all it does it call a function? Please don't do the minimum needed to make your robot happy. Think about the code, the change, is this the best fix? Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel