Skip to content

Commit

Permalink
sparc: Use fallthrough pseudo-keyword
Browse files Browse the repository at this point in the history
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gustavo A. R. Silva authored and David S. Miller committed Jul 22, 2020
1 parent aecc63a commit 17ec0a1
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 16 deletions.
1 change: 0 additions & 1 deletion arch/sparc/kernel/auxio_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ void auxio_set_lte(int on)
__auxio_sbus_set_lte(on);
break;
case AUXIO_TYPE_EBUS:
/* FALL-THROUGH */
default:
break;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/central.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static int clock_board_calc_nslots(struct clock_board *p)
else
return 5;
}
/* Fallthrough */
fallthrough;
default:
return 4;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/kgdb_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
linux_regs->pc = addr;
linux_regs->npc = addr + 4;
}
/* fall through */
fallthrough;

case 'D':
case 'k':
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/kgdb_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
linux_regs->tpc = addr;
linux_regs->tnpc = addr + 4;
}
/* fall through */
fallthrough;

case 'D':
case 'k':
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/pcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ int __init pcr_arch_init(void)
* counter overflow interrupt so we can't make use of
* their hardware currently.
*/
/* fallthrough */
fallthrough;
default:
err = -ENODEV;
goto out_unregister;
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/prom_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void __init of_console_init(void)

case PROMDEV_TTYB:
skip = 1;
/* FALLTHRU */
fallthrough;

case PROMDEV_TTYA:
type = "serial";
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc/kernel/signal32.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs
case ERESTARTSYS:
if (!(sa->sa_flags & SA_RESTART))
goto no_system_call_restart;
/* fallthrough */
fallthrough;
case ERESTARTNOINTR:
regs->u_regs[UREG_I0] = orig_i0;
regs->tpc -= 4;
Expand Down Expand Up @@ -686,7 +686,7 @@ void do_signal32(struct pt_regs * regs)
regs->tpc -= 4;
regs->tnpc -= 4;
pt_regs_clear_syscall(regs);
/* fall through */
fallthrough;
case ERESTART_RESTARTBLOCK:
regs->u_regs[UREG_G1] = __NR_restart_syscall;
regs->tpc -= 4;
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
case ERESTARTSYS:
if (!(sa->sa_flags & SA_RESTART))
goto no_system_call_restart;
/* fallthrough */
fallthrough;
case ERESTARTNOINTR:
regs->u_regs[UREG_I0] = orig_i0;
regs->pc -= 4;
Expand Down Expand Up @@ -507,7 +507,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
regs->pc -= 4;
regs->npc -= 4;
pt_regs_clear_syscall(regs);
/* fall through */
fallthrough;
case ERESTART_RESTARTBLOCK:
regs->u_regs[UREG_G1] = __NR_restart_syscall;
regs->pc -= 4;
Expand Down
4 changes: 2 additions & 2 deletions arch/sparc/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
case ERESTARTSYS:
if (!(sa->sa_flags & SA_RESTART))
goto no_system_call_restart;
/* fallthrough */
fallthrough;
case ERESTARTNOINTR:
regs->u_regs[UREG_I0] = orig_i0;
regs->tpc -= 4;
Expand Down Expand Up @@ -532,7 +532,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
regs->tpc -= 4;
regs->tnpc -= 4;
pt_regs_clear_syscall(regs);
/* fall through */
fallthrough;
case ERESTART_RESTARTBLOCK:
regs->u_regs[UREG_G1] = __NR_restart_syscall;
regs->tpc -= 4;
Expand Down
8 changes: 4 additions & 4 deletions arch/sparc/math-emu/math_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
*pfsr |= (6 << 14);
return 0; /* simulate invalid_fp_register exception */
}
/* fall through */
fallthrough;
case 2:
if (freg & 1) { /* doublewords must have bit 5 zeroed */
*pfsr |= (6 << 14);
Expand All @@ -380,7 +380,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
*pfsr |= (6 << 14);
return 0; /* simulate invalid_fp_register exception */
}
/* fall through */
fallthrough;
case 2:
if (freg & 1) { /* doublewords must have bit 5 zeroed */
*pfsr |= (6 << 14);
Expand Down Expand Up @@ -408,13 +408,13 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
*pfsr |= (6 << 14);
return 0; /* simulate invalid_fp_register exception */
}
/* fall through */
fallthrough;
case 2:
if (freg & 1) { /* doublewords must have bit 5 zeroed */
*pfsr |= (6 << 14);
return 0;
}
/* fall through */
fallthrough;
case 1:
rd = (void *)&fregs[freg];
break;
Expand Down

0 comments on commit 17ec0a1

Please sign in to comment.