All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Sibyte: remove unnecessary return variable
@ 2022-05-05  3:01 Guo Zhengkui
  2022-05-12 16:09 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Guo Zhengkui @ 2022-05-05  3:01 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Guo Zhengkui, open list:MIPS, open list; +Cc: zhengkui_guo

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 <guozhengkui@vivo.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Sibyte: remove unnecessary return variable
  2022-05-05  3:01 [PATCH] MIPS: Sibyte: remove unnecessary return variable Guo Zhengkui
@ 2022-05-12 16:09 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2022-05-12 16:09 UTC (permalink / raw)
  To: Guo Zhengkui; +Cc: open list:MIPS, open list, zhengkui_guo

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 <guozhengkui@vivo.com>
> ---
>  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 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-12 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05  3:01 [PATCH] MIPS: Sibyte: remove unnecessary return variable Guo Zhengkui
2022-05-12 16:09 ` Thomas Bogendoerfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.