linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: qcom-geni-se: remove redundant initialization to variable line
@ 2021-04-22 12:58 Colin King
  2021-04-23  4:09 ` Jiri Slaby
  2021-04-23  5:22 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2021-04-22 12:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Greg Kroah-Hartman, Jiri Slaby,
	linux-arm-msm, linux-serial
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable line being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/tty/serial/qcom_geni_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 99375d99f6fa..c5f2a4fa2bb1 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1338,7 +1338,7 @@ static const struct uart_ops qcom_geni_uart_pops = {
 static int qcom_geni_serial_probe(struct platform_device *pdev)
 {
 	int ret = 0;
-	int line = -1;
+	int line;
 	struct qcom_geni_serial_port *port;
 	struct uart_port *uport;
 	struct resource *res;
-- 
2.30.2


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

* Re: [PATCH] soc: qcom-geni-se: remove redundant initialization to variable line
  2021-04-22 12:58 [PATCH] soc: qcom-geni-se: remove redundant initialization to variable line Colin King
@ 2021-04-23  4:09 ` Jiri Slaby
  2021-04-23  5:22 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2021-04-23  4:09 UTC (permalink / raw)
  To: Colin King, Andy Gross, Bjorn Andersson, Greg Kroah-Hartman,
	linux-arm-msm, linux-serial
  Cc: kernel-janitors, linux-kernel

On 22. 04. 21, 14:58, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable line being initialized with a value that is never read
> and it is being updated later with a new value. The initialization is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>

> ---
>   drivers/tty/serial/qcom_geni_serial.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 99375d99f6fa..c5f2a4fa2bb1 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1338,7 +1338,7 @@ static const struct uart_ops qcom_geni_uart_pops = {
>   static int qcom_geni_serial_probe(struct platform_device *pdev)
>   {
>   	int ret = 0;
> -	int line = -1;
> +	int line;
>   	struct qcom_geni_serial_port *port;
>   	struct uart_port *uport;
>   	struct resource *res;
> 


-- 
js
suse labs

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

* Re: [PATCH] soc: qcom-geni-se: remove redundant initialization to variable line
  2021-04-22 12:58 [PATCH] soc: qcom-geni-se: remove redundant initialization to variable line Colin King
  2021-04-23  4:09 ` Jiri Slaby
@ 2021-04-23  5:22 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-04-23  5:22 UTC (permalink / raw)
  To: Colin King
  Cc: Andy Gross, Bjorn Andersson, Jiri Slaby, linux-arm-msm,
	linux-serial, kernel-janitors, linux-kernel

On Thu, Apr 22, 2021 at 01:58:10PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable line being initialized with a value that is never read
> and it is being updated later with a new value. The initialization is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/tty/serial/qcom_geni_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Your subject line is odd, this is not a "SOC" driver :(


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

end of thread, other threads:[~2021-04-23  5:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 12:58 [PATCH] soc: qcom-geni-se: remove redundant initialization to variable line Colin King
2021-04-23  4:09 ` Jiri Slaby
2021-04-23  5:22 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).