Commit 1feedf61 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman

tty: synclinkmp: Adjust indentation in several functions

Clang warns:

../drivers/tty/synclinkmp.c:1456:3: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]
        if (C_CRTSCTS(tty)) {
        ^
../drivers/tty/synclinkmp.c:1453:2: note: previous statement is here
        if (I_IXOFF(tty))
        ^
../drivers/tty/synclinkmp.c:2473:8: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]
                                                info->port.tty->hw_stopped = 0;
                                                ^
../drivers/tty/synclinkmp.c:2471:7: note: previous statement is here
                                                if ( debug_level >= DEBUG_LEVEL_ISR )
                                                ^
../drivers/tty/synclinkmp.c:2482:8: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]
                                                info->port.tty->hw_stopped = 1;
                                                ^
../drivers/tty/synclinkmp.c:2480:7: note: previous statement is here
                                                if ( debug_level >= DEBUG_LEVEL_ISR )
                                                ^
../drivers/tty/synclinkmp.c:2809:3: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]
        if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty))
        ^
../drivers/tty/synclinkmp.c:2807:2: note: previous statement is here
        if (I_INPCK(info->port.tty))
        ^
../drivers/tty/synclinkmp.c:3246:3: warning: misleading indentation;
statement is not part of the previous 'else' [-Wmisleading-indentation]
        set_signals(info);
        ^
../drivers/tty/synclinkmp.c:3244:2: note: previous statement is here
        else
        ^
5 warnings generated.

The indentation on these lines is not at all consistent, tabs and spaces
are mixed together. Convert to just using tabs to be consistent with the
Linux kernel coding style and eliminate these warnings from clang.

Link: https://github.com/ClangBuiltLinux/linux/issues/823Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Link: https://lore.kernel.org/r/20191218024720.3528-1-natechancellor@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9a655c77
...@@ -1453,10 +1453,10 @@ static void throttle(struct tty_struct * tty) ...@@ -1453,10 +1453,10 @@ static void throttle(struct tty_struct * tty)
if (I_IXOFF(tty)) if (I_IXOFF(tty))
send_xchar(tty, STOP_CHAR(tty)); send_xchar(tty, STOP_CHAR(tty));
if (C_CRTSCTS(tty)) { if (C_CRTSCTS(tty)) {
spin_lock_irqsave(&info->lock,flags); spin_lock_irqsave(&info->lock,flags);
info->serial_signals &= ~SerialSignal_RTS; info->serial_signals &= ~SerialSignal_RTS;
set_signals(info); set_signals(info);
spin_unlock_irqrestore(&info->lock,flags); spin_unlock_irqrestore(&info->lock,flags);
} }
} }
...@@ -1482,10 +1482,10 @@ static void unthrottle(struct tty_struct * tty) ...@@ -1482,10 +1482,10 @@ static void unthrottle(struct tty_struct * tty)
send_xchar(tty, START_CHAR(tty)); send_xchar(tty, START_CHAR(tty));
} }
if (C_CRTSCTS(tty)) { if (C_CRTSCTS(tty)) {
spin_lock_irqsave(&info->lock,flags); spin_lock_irqsave(&info->lock,flags);
info->serial_signals |= SerialSignal_RTS; info->serial_signals |= SerialSignal_RTS;
set_signals(info); set_signals(info);
spin_unlock_irqrestore(&info->lock,flags); spin_unlock_irqrestore(&info->lock,flags);
} }
} }
...@@ -2470,7 +2470,7 @@ static void isr_io_pin( SLMP_INFO *info, u16 status ) ...@@ -2470,7 +2470,7 @@ static void isr_io_pin( SLMP_INFO *info, u16 status )
if (status & SerialSignal_CTS) { if (status & SerialSignal_CTS) {
if ( debug_level >= DEBUG_LEVEL_ISR ) if ( debug_level >= DEBUG_LEVEL_ISR )
printk("CTS tx start..."); printk("CTS tx start...");
info->port.tty->hw_stopped = 0; info->port.tty->hw_stopped = 0;
tx_start(info); tx_start(info);
info->pending_bh |= BH_TRANSMIT; info->pending_bh |= BH_TRANSMIT;
return; return;
...@@ -2479,7 +2479,7 @@ static void isr_io_pin( SLMP_INFO *info, u16 status ) ...@@ -2479,7 +2479,7 @@ static void isr_io_pin( SLMP_INFO *info, u16 status )
if (!(status & SerialSignal_CTS)) { if (!(status & SerialSignal_CTS)) {
if ( debug_level >= DEBUG_LEVEL_ISR ) if ( debug_level >= DEBUG_LEVEL_ISR )
printk("CTS tx stop..."); printk("CTS tx stop...");
info->port.tty->hw_stopped = 1; info->port.tty->hw_stopped = 1;
tx_stop(info); tx_stop(info);
} }
} }
...@@ -2806,8 +2806,8 @@ static void change_params(SLMP_INFO *info) ...@@ -2806,8 +2806,8 @@ static void change_params(SLMP_INFO *info)
info->read_status_mask2 = OVRN; info->read_status_mask2 = OVRN;
if (I_INPCK(info->port.tty)) if (I_INPCK(info->port.tty))
info->read_status_mask2 |= PE | FRME; info->read_status_mask2 |= PE | FRME;
if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty)) if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty))
info->read_status_mask1 |= BRKD; info->read_status_mask1 |= BRKD;
if (I_IGNPAR(info->port.tty)) if (I_IGNPAR(info->port.tty))
info->ignore_status_mask2 |= PE | FRME; info->ignore_status_mask2 |= PE | FRME;
if (I_IGNBRK(info->port.tty)) { if (I_IGNBRK(info->port.tty)) {
...@@ -3177,7 +3177,7 @@ static int tiocmget(struct tty_struct *tty) ...@@ -3177,7 +3177,7 @@ static int tiocmget(struct tty_struct *tty)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&info->lock,flags); spin_lock_irqsave(&info->lock,flags);
get_signals(info); get_signals(info);
spin_unlock_irqrestore(&info->lock,flags); spin_unlock_irqrestore(&info->lock,flags);
result = ((info->serial_signals & SerialSignal_RTS) ? TIOCM_RTS : 0) | result = ((info->serial_signals & SerialSignal_RTS) ? TIOCM_RTS : 0) |
...@@ -3215,7 +3215,7 @@ static int tiocmset(struct tty_struct *tty, ...@@ -3215,7 +3215,7 @@ static int tiocmset(struct tty_struct *tty,
info->serial_signals &= ~SerialSignal_DTR; info->serial_signals &= ~SerialSignal_DTR;
spin_lock_irqsave(&info->lock,flags); spin_lock_irqsave(&info->lock,flags);
set_signals(info); set_signals(info);
spin_unlock_irqrestore(&info->lock,flags); spin_unlock_irqrestore(&info->lock,flags);
return 0; return 0;
...@@ -3227,7 +3227,7 @@ static int carrier_raised(struct tty_port *port) ...@@ -3227,7 +3227,7 @@ static int carrier_raised(struct tty_port *port)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&info->lock,flags); spin_lock_irqsave(&info->lock,flags);
get_signals(info); get_signals(info);
spin_unlock_irqrestore(&info->lock,flags); spin_unlock_irqrestore(&info->lock,flags);
return (info->serial_signals & SerialSignal_DCD) ? 1 : 0; return (info->serial_signals & SerialSignal_DCD) ? 1 : 0;
...@@ -3243,7 +3243,7 @@ static void dtr_rts(struct tty_port *port, int on) ...@@ -3243,7 +3243,7 @@ static void dtr_rts(struct tty_port *port, int on)
info->serial_signals |= SerialSignal_RTS | SerialSignal_DTR; info->serial_signals |= SerialSignal_RTS | SerialSignal_DTR;
else else
info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR); info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR);
set_signals(info); set_signals(info);
spin_unlock_irqrestore(&info->lock,flags); spin_unlock_irqrestore(&info->lock,flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment