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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B198C433F5 for ; Thu, 12 May 2022 16:11:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356320AbiELQLx (ORCPT ); Thu, 12 May 2022 12:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356315AbiELQLr (ORCPT ); Thu, 12 May 2022 12:11:47 -0400 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CB0EE66687; Thu, 12 May 2022 09:11:42 -0700 (PDT) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1npBPf-0001Vm-03; Thu, 12 May 2022 18:11:39 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id AE78BC01DC; Thu, 12 May 2022 18:09:27 +0200 (CEST) Date: Thu, 12 May 2022 18:09:27 +0200 From: Thomas Bogendoerfer To: Guo Zhengkui Cc: "open list:MIPS" , open list , zhengkui_guo@outlook.com Subject: Re: [PATCH] MIPS: Sibyte: remove unnecessary return variable Message-ID: <20220512160927.GD14475@alpha.franken.de> References: <20220505030116.14371-1-guozhengkui@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220505030116.14371-1-guozhengkui@vivo.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 05, 2022 at 11:01:14AM +0800, Guo Zhengkui wrote: > Fix the following coccicheck warning: > > arch/mips/sibyte/bcm1480/setup.c:37:5-8: Unneeded variable: "ret". > Return "0" on line 67. > > Signed-off-by: Guo Zhengkui > --- > arch/mips/sibyte/bcm1480/setup.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c > index 6f34b871b08e..e3e807046a9c 100644 > --- a/arch/mips/sibyte/bcm1480/setup.c > +++ b/arch/mips/sibyte/bcm1480/setup.c > @@ -34,8 +34,6 @@ static char *pass_str; > > static int __init setup_bcm1x80_bcm1x55(void) > { > - int ret = 0; > - > switch (soc_pass) { > case K_SYS_REVISION_BCM1480_S0: > periph_rev = 1; > @@ -64,7 +62,7 @@ static int __init setup_bcm1x80_bcm1x55(void) > break; > } > > - return ret; > + return 0; > } > > /* Setup code likely to be common to all SiByte platforms */ > -- > 2.20.1 applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]