[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240207101833.2440799-1-colin.i.king@gmail.com>
Date: Wed, 7 Feb 2024 10:18:33 +0000
From: Colin Ian King <colin.i.king@...il.com>
To: Johan Hovold <johan@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH][next] USB: serial: oti6858: Remove redundant assignment to variable divisor
The variable divisor is being assigned a value that is not being
read afterward, it is being re-assigned later in both paths of an if
statement. The assignment is redundant and can be removed.
Cleans up clang scan warning:
drivers/usb/serial/oti6858.c:412:2: warning: Value stored to 'divisor'
is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
drivers/usb/serial/oti6858.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index 6365cfe5402c..fa07f6ff9ecc 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -409,7 +409,6 @@ static void oti6858_set_termios(struct tty_struct *tty,
cflag = tty->termios.c_cflag;
spin_lock_irqsave(&priv->lock, flags);
- divisor = priv->pending_setup.divisor;
frame_fmt = priv->pending_setup.frame_fmt;
control = priv->pending_setup.control;
spin_unlock_irqrestore(&priv->lock, flags);
--
2.39.2
Powered by blists - more mailing lists