From: Peter Hurley Date: Thu, 16 Oct 2014 18:19:48 +0000 (-0400) Subject: serial: Fix sparse warnings in uart_throttle()/uart_unthrottle() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=91f189de4640a6531a00fbc6a6c6adc7804af1e9;p=linux-beck.git serial: Fix sparse warnings in uart_throttle()/uart_unthrottle() The struct uart_port.flags field is type upf_t, as are the matching bit definitions. Change local mask variable to type upf_t. Fixes sparse warnings: drivers/tty/serial/serial_core.c:620:22: warning: invalid assignment: |= drivers/tty/serial/serial_core.c:620:22: left side has type unsigned int drivers/tty/serial/serial_core.c:620:22: right side has type restricted upf_t drivers/tty/serial/serial_core.c:622:22: warning: invalid assignment: |= drivers/tty/serial/serial_core.c:622:22: left side has type unsigned int drivers/tty/serial/serial_core.c:622:22: right side has type restricted upf_t drivers/tty/serial/serial_core.c:624:17: warning: restricted upf_t degrades to integer drivers/tty/serial/serial_core.c:626:22: warning: invalid assignment: &= drivers/tty/serial/serial_core.c:626:22: left side has type unsigned int drivers/tty/serial/serial_core.c:626:22: right side has type restricted upf_t drivers/tty/serial/serial_core.c:629:20: warning: restricted upf_t degrades to integer drivers/tty/serial/serial_core.c:632:20: warning: restricted upf_t degrades to integer drivers/tty/serial/serial_core.c:643:22: warning: invalid assignment: |= drivers/tty/serial/serial_core.c:643:22: left side has type unsigned int drivers/tty/serial/serial_core.c:643:22: right side has type restricted upf_t drivers/tty/serial/serial_core.c:645:22: warning: invalid assignment: |= drivers/tty/serial/serial_core.c:645:22: left side has type unsigned int drivers/tty/serial/serial_core.c:645:22: right side has type restricted upf_t drivers/tty/serial/serial_core.c:647:17: warning: restricted upf_t degrades to integer drivers/tty/serial/serial_core.c:649:22: warning: invalid assignment: &= drivers/tty/serial/serial_core.c:649:22: left side has type unsigned int drivers/tty/serial/serial_core.c:649:22: right side has type restricted upf_t drivers/tty/serial/serial_core.c:652:20: warning: restricted upf_t degrades to integer drivers/tty/serial/serial_core.c:655:20: warning: restricted upf_t degrades to integer Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 971103714ddd..1166c52e51f4 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -618,7 +618,7 @@ static void uart_throttle(struct tty_struct *tty) { struct uart_state *state = tty->driver_data; struct uart_port *port = state->uart_port; - uint32_t mask = 0; + upf_t mask = 0; if (I_IXOFF(tty)) mask |= UPF_SOFT_FLOW; @@ -641,7 +641,7 @@ static void uart_unthrottle(struct tty_struct *tty) { struct uart_state *state = tty->driver_data; struct uart_port *port = state->uart_port; - uint32_t mask = 0; + upf_t mask = 0; if (I_IXOFF(tty)) mask |= UPF_SOFT_FLOW;