linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] USB: serial: ftdi_sio: Remove redundant assignment to variable cflag
@ 2024-02-07 10:49 Colin Ian King
  2024-03-04 13:47 ` Johan Hovold
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-02-07 10:49 UTC (permalink / raw)
  To: Johan Hovold, Greg Kroah-Hartman, linux-usb; +Cc: kernel-janitors, linux-kernel

The variable cflag is being assigned a value that is not being read
afterwards, it is being re-assigned later on. The assignment is
redundant and can be removed.

Cleans up clang scan warning:
drivers/usb/serial/ftdi_sio.c:2613:15: warning: Value stored to 'cflag'
during its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/usb/serial/ftdi_sio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 13a56783830d..c634d345a652 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -2610,7 +2610,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
 	struct device *ddev = &port->dev;
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	struct ktermios *termios = &tty->termios;
-	unsigned int cflag = termios->c_cflag;
+	unsigned int cflag;
 	u16 value, index;
 	int ret;
 
-- 
2.39.2


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

* Re: [PATCH][next] USB: serial: ftdi_sio: Remove redundant assignment to variable cflag
  2024-02-07 10:49 [PATCH][next] USB: serial: ftdi_sio: Remove redundant assignment to variable cflag Colin Ian King
@ 2024-03-04 13:47 ` Johan Hovold
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2024-03-04 13:47 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Greg Kroah-Hartman, linux-usb, kernel-janitors, linux-kernel

On Wed, Feb 07, 2024 at 10:49:36AM +0000, Colin Ian King wrote:
> The variable cflag is being assigned a value that is not being read
> afterwards, it is being re-assigned later on. The assignment is
> redundant and can be removed.
> 
> Cleans up clang scan warning:
> drivers/usb/serial/ftdi_sio.c:2613:15: warning: Value stored to 'cflag'
> during its initialization is never read [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Applied, thanks.

Johan

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

end of thread, other threads:[~2024-03-04 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 10:49 [PATCH][next] USB: serial: ftdi_sio: Remove redundant assignment to variable cflag Colin Ian King
2024-03-04 13:47 ` Johan Hovold

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).