serial: Fix sparse warnings in uart_throttle()/uart_unthrottle()
authorPeter Hurley <peter@hurleysoftware.com>
Thu, 16 Oct 2014 18:19:48 +0000 (14:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 00:15:43 +0000 (16:15 -0800)
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 <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c

index 971103714ddd73cb02a99bee219fcc9d67fb1182..1166c52e51f46f706c4c8a4704b211b4a418ef6d 100644 (file)
@@ -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;
This page took 0.026425 seconds and 5 git commands to generate.