All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tty: serial: samsung_tty: remove set but not used variables
@ 2021-04-26 13:18 ` Tian Tao
  0 siblings, 0 replies; 4+ messages in thread
From: Tian Tao @ 2021-04-26 13:18 UTC (permalink / raw)
  To: krzysztof.kozlowski, gregkh, jirislaby
  Cc: linux-arm-kernel, linux-samsung-soc, linux-serial, Tian Tao

The value of 'ret' is not used which reported by svace, so jutst return
instead of break.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
v2: s3c24xx_serial_probe function exit than convert ret to some default
value when the attribute "reg-io-width" is not 1 or 4.
---
 drivers/tty/serial/samsung_tty.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index d9e4b67..9fbc611 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -2220,8 +2220,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
 			default:
 				dev_warn(&pdev->dev, "unsupported reg-io-width (%d)\n",
 						prop);
-				ret = -EINVAL;
-				break;
+				return -EINVAL;
 			}
 		}
 	}
-- 
2.7.4


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

* [PATCH v2] tty: serial: samsung_tty: remove set but not used variables
@ 2021-04-26 13:18 ` Tian Tao
  0 siblings, 0 replies; 4+ messages in thread
From: Tian Tao @ 2021-04-26 13:18 UTC (permalink / raw)
  To: krzysztof.kozlowski, gregkh, jirislaby
  Cc: linux-arm-kernel, linux-samsung-soc, linux-serial, Tian Tao

The value of 'ret' is not used which reported by svace, so jutst return
instead of break.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
v2: s3c24xx_serial_probe function exit than convert ret to some default
value when the attribute "reg-io-width" is not 1 or 4.
---
 drivers/tty/serial/samsung_tty.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index d9e4b67..9fbc611 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -2220,8 +2220,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
 			default:
 				dev_warn(&pdev->dev, "unsupported reg-io-width (%d)\n",
 						prop);
-				ret = -EINVAL;
-				break;
+				return -EINVAL;
 			}
 		}
 	}
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] tty: serial: samsung_tty: remove set but not used variables
  2021-04-26 13:18 ` Tian Tao
@ 2021-04-26 14:12   ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-04-26 14:12 UTC (permalink / raw)
  To: Tian Tao, gregkh, jirislaby
  Cc: linux-arm-kernel, linux-samsung-soc, linux-serial

On 26/04/2021 15:18, Tian Tao wrote:
> The value of 'ret' is not used which reported by svace, so jutst return

s/jutst/just/


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

> instead of break.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
> v2: s3c24xx_serial_probe function exit than convert ret to some default
> value when the attribute "reg-io-width" is not 1 or 4.
> ---
>  drivers/tty/serial/samsung_tty.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)



Best regards,
Krzysztof

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

* Re: [PATCH v2] tty: serial: samsung_tty: remove set but not used variables
@ 2021-04-26 14:12   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-04-26 14:12 UTC (permalink / raw)
  To: Tian Tao, gregkh, jirislaby
  Cc: linux-arm-kernel, linux-samsung-soc, linux-serial

On 26/04/2021 15:18, Tian Tao wrote:
> The value of 'ret' is not used which reported by svace, so jutst return

s/jutst/just/


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

> instead of break.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
> v2: s3c24xx_serial_probe function exit than convert ret to some default
> value when the attribute "reg-io-width" is not 1 or 4.
> ---
>  drivers/tty/serial/samsung_tty.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)



Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-04-26 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 13:18 [PATCH v2] tty: serial: samsung_tty: remove set but not used variables Tian Tao
2021-04-26 13:18 ` Tian Tao
2021-04-26 14:12 ` Krzysztof Kozlowski
2021-04-26 14:12   ` Krzysztof Kozlowski

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.