mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 15:16:41 +07:00
USB: serial: mos7720: remove redundant variables iflag, mask and serial
Variables iflag, mask and serial are being assigned but are never used hence are redundant and can be removed. Cleans up clang warnings: warning: variable 'iflag' set but not used [-Wunused-but-set-variable] warning: variable 'mask' set but not used [-Wunused-but-set-variable] warning: variable 'serial' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
3738c50665
commit
1e2ae1d7e4
@ -1527,8 +1527,6 @@ static void change_port_settings(struct tty_struct *tty,
|
|||||||
struct usb_serial *serial;
|
struct usb_serial *serial;
|
||||||
int baud;
|
int baud;
|
||||||
unsigned cflag;
|
unsigned cflag;
|
||||||
unsigned iflag;
|
|
||||||
__u8 mask = 0xff;
|
|
||||||
__u8 lData;
|
__u8 lData;
|
||||||
__u8 lParity;
|
__u8 lParity;
|
||||||
__u8 lStop;
|
__u8 lStop;
|
||||||
@ -1552,23 +1550,19 @@ static void change_port_settings(struct tty_struct *tty,
|
|||||||
lParity = 0x00; /* No parity */
|
lParity = 0x00; /* No parity */
|
||||||
|
|
||||||
cflag = tty->termios.c_cflag;
|
cflag = tty->termios.c_cflag;
|
||||||
iflag = tty->termios.c_iflag;
|
|
||||||
|
|
||||||
/* Change the number of bits */
|
/* Change the number of bits */
|
||||||
switch (cflag & CSIZE) {
|
switch (cflag & CSIZE) {
|
||||||
case CS5:
|
case CS5:
|
||||||
lData = UART_LCR_WLEN5;
|
lData = UART_LCR_WLEN5;
|
||||||
mask = 0x1f;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CS6:
|
case CS6:
|
||||||
lData = UART_LCR_WLEN6;
|
lData = UART_LCR_WLEN6;
|
||||||
mask = 0x3f;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CS7:
|
case CS7:
|
||||||
lData = UART_LCR_WLEN7;
|
lData = UART_LCR_WLEN7;
|
||||||
mask = 0x7f;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case CS8:
|
case CS8:
|
||||||
@ -1686,11 +1680,8 @@ static void mos7720_set_termios(struct tty_struct *tty,
|
|||||||
struct usb_serial_port *port, struct ktermios *old_termios)
|
struct usb_serial_port *port, struct ktermios *old_termios)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
struct usb_serial *serial;
|
|
||||||
struct moschip_port *mos7720_port;
|
struct moschip_port *mos7720_port;
|
||||||
|
|
||||||
serial = port->serial;
|
|
||||||
|
|
||||||
mos7720_port = usb_get_serial_port_data(port);
|
mos7720_port = usb_get_serial_port_data(port);
|
||||||
|
|
||||||
if (mos7720_port == NULL)
|
if (mos7720_port == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user