Skip to content
Commit 9c6a2583 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman
Browse files

serial: mps2-uart: Add parentheses around conditional in mps2_uart_shutdown



Clang warns:

drivers/tty/serial/mps2-uart.c:351:6: warning: logical not is only
applied to the left hand side of this bitwise operator
[-Wlogical-not-parentheses]
        if (!mps_port->flags & UART_PORT_COMBINED_IRQ) {
            ^                ~
drivers/tty/serial/mps2-uart.c:351:6: note: add parentheses after the
'!' to evaluate the bitwise operator first
        if (!mps_port->flags & UART_PORT_COMBINED_IRQ) {
            ^
             (                                       )
drivers/tty/serial/mps2-uart.c:351:6: note: add parentheses around left
hand side expression to silence this warning
        if (!mps_port->flags & UART_PORT_COMBINED_IRQ) {
            ^
            (               )
1 warning generated.

As it was intended for this check to be the inverse of the one at the
bottom of mps2_init_port, add parentheses around the whole conditional.

Fixes: 775ea4ea ("serial: mps2-uart: support combined irq")
Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Acked-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/344


Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7ab57b76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment