USB: serial: cypress_m8: remove set but not used variable 'iflag'
authorYueHaibing <yuehaibing@huawei.com>
Thu, 4 Oct 2018 07:09:53 +0000 (07:09 +0000)
committerJohan Hovold <johan@kernel.org>
Fri, 5 Oct 2018 06:58:42 +0000 (08:58 +0200)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/serial/cypress_m8.c: In function 'cypress_set_termios':
drivers/usb/serial/cypress_m8.c:866:18: warning:
 variable 'iflag' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cypress_m8.c

index 5aaab8f4dd8f97799761cab91024678de25cd184..ed51bc48eea65b3d59df5ae8ea168994059c913b 100644 (file)
@@ -863,7 +863,7 @@ static void cypress_set_termios(struct tty_struct *tty,
        struct cypress_private *priv = usb_get_serial_port_data(port);
        struct device *dev = &port->dev;
        int data_bits, stop_bits, parity_type, parity_enable;
-       unsigned cflag, iflag;
+       unsigned int cflag;
        unsigned long flags;
        __u8 oldlines;
        int linechange = 0;
@@ -899,7 +899,6 @@ static void cypress_set_termios(struct tty_struct *tty,
        tty->termios.c_cflag &= ~(CMSPAR|CRTSCTS);
 
        cflag = tty->termios.c_cflag;
-       iflag = tty->termios.c_iflag;
 
        /* check if there are new settings */
        if (old_termios) {