Skip to content

Commit 0317ae3

Browse files
nathanchancegregkh
authored andcommitted
tty: synclinkmp: Adjust indentation in several functions
[ Upstream commit 1feedf6 ] 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: ClangBuiltLinux/linux#823 Signed-off-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f1f2d97 commit 0317ae3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

drivers/tty/synclinkmp.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,10 +1467,10 @@ static void throttle(struct tty_struct * tty)
14671467
if (I_IXOFF(tty))
14681468
send_xchar(tty, STOP_CHAR(tty));
14691469

1470-
if (C_CRTSCTS(tty)) {
1470+
if (C_CRTSCTS(tty)) {
14711471
spin_lock_irqsave(&info->lock,flags);
14721472
info->serial_signals &= ~SerialSignal_RTS;
1473-
set_signals(info);
1473+
set_signals(info);
14741474
spin_unlock_irqrestore(&info->lock,flags);
14751475
}
14761476
}
@@ -1496,10 +1496,10 @@ static void unthrottle(struct tty_struct * tty)
14961496
send_xchar(tty, START_CHAR(tty));
14971497
}
14981498

1499-
if (C_CRTSCTS(tty)) {
1499+
if (C_CRTSCTS(tty)) {
15001500
spin_lock_irqsave(&info->lock,flags);
15011501
info->serial_signals |= SerialSignal_RTS;
1502-
set_signals(info);
1502+
set_signals(info);
15031503
spin_unlock_irqrestore(&info->lock,flags);
15041504
}
15051505
}
@@ -2485,7 +2485,7 @@ static void isr_io_pin( SLMP_INFO *info, u16 status )
24852485
if (status & SerialSignal_CTS) {
24862486
if ( debug_level >= DEBUG_LEVEL_ISR )
24872487
printk("CTS tx start...");
2488-
info->port.tty->hw_stopped = 0;
2488+
info->port.tty->hw_stopped = 0;
24892489
tx_start(info);
24902490
info->pending_bh |= BH_TRANSMIT;
24912491
return;
@@ -2494,7 +2494,7 @@ static void isr_io_pin( SLMP_INFO *info, u16 status )
24942494
if (!(status & SerialSignal_CTS)) {
24952495
if ( debug_level >= DEBUG_LEVEL_ISR )
24962496
printk("CTS tx stop...");
2497-
info->port.tty->hw_stopped = 1;
2497+
info->port.tty->hw_stopped = 1;
24982498
tx_stop(info);
24992499
}
25002500
}
@@ -2821,8 +2821,8 @@ static void change_params(SLMP_INFO *info)
28212821
info->read_status_mask2 = OVRN;
28222822
if (I_INPCK(info->port.tty))
28232823
info->read_status_mask2 |= PE | FRME;
2824-
if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty))
2825-
info->read_status_mask1 |= BRKD;
2824+
if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty))
2825+
info->read_status_mask1 |= BRKD;
28262826
if (I_IGNPAR(info->port.tty))
28272827
info->ignore_status_mask2 |= PE | FRME;
28282828
if (I_IGNBRK(info->port.tty)) {
@@ -3192,7 +3192,7 @@ static int tiocmget(struct tty_struct *tty)
31923192
unsigned long flags;
31933193

31943194
spin_lock_irqsave(&info->lock,flags);
3195-
get_signals(info);
3195+
get_signals(info);
31963196
spin_unlock_irqrestore(&info->lock,flags);
31973197

31983198
result = ((info->serial_signals & SerialSignal_RTS) ? TIOCM_RTS : 0) |
@@ -3230,7 +3230,7 @@ static int tiocmset(struct tty_struct *tty,
32303230
info->serial_signals &= ~SerialSignal_DTR;
32313231

32323232
spin_lock_irqsave(&info->lock,flags);
3233-
set_signals(info);
3233+
set_signals(info);
32343234
spin_unlock_irqrestore(&info->lock,flags);
32353235

32363236
return 0;
@@ -3242,7 +3242,7 @@ static int carrier_raised(struct tty_port *port)
32423242
unsigned long flags;
32433243

32443244
spin_lock_irqsave(&info->lock,flags);
3245-
get_signals(info);
3245+
get_signals(info);
32463246
spin_unlock_irqrestore(&info->lock,flags);
32473247

32483248
return (info->serial_signals & SerialSignal_DCD) ? 1 : 0;
@@ -3258,7 +3258,7 @@ static void dtr_rts(struct tty_port *port, int on)
32583258
info->serial_signals |= SerialSignal_RTS | SerialSignal_DTR;
32593259
else
32603260
info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR);
3261-
set_signals(info);
3261+
set_signals(info);
32623262
spin_unlock_irqrestore(&info->lock,flags);
32633263
}
32643264

0 commit comments

Comments
 (0)