Message ID | 20240207104936.2441424-1-colin.i.king@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 17a2f0b45ad1894d89832553947340872d4daecc |
Headers | show |
Series | [next] USB: serial: ftdi_sio: Remove redundant assignment to variable cflag | expand |
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
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;
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(-)