Skip to content

Commit 17ec0a1

Browse files
GustavoARSilvadavem330
authored andcommitted
sparc: Use fallthrough pseudo-keyword
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>
1 parent aecc63a commit 17ec0a1

File tree

10 files changed

+15
-16
lines changed

10 files changed

+15
-16
lines changed

arch/sparc/kernel/auxio_64.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ void auxio_set_lte(int on)
8787
__auxio_sbus_set_lte(on);
8888
break;
8989
case AUXIO_TYPE_EBUS:
90-
/* FALL-THROUGH */
9190
default:
9291
break;
9392
}

arch/sparc/kernel/central.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static int clock_board_calc_nslots(struct clock_board *p)
5555
else
5656
return 5;
5757
}
58-
/* Fallthrough */
58+
fallthrough;
5959
default:
6060
return 4;
6161
}

arch/sparc/kernel/kgdb_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
122122
linux_regs->pc = addr;
123123
linux_regs->npc = addr + 4;
124124
}
125-
/* fall through */
125+
fallthrough;
126126

127127
case 'D':
128128
case 'k':

arch/sparc/kernel/kgdb_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
148148
linux_regs->tpc = addr;
149149
linux_regs->tnpc = addr + 4;
150150
}
151-
/* fall through */
151+
fallthrough;
152152

153153
case 'D':
154154
case 'k':

arch/sparc/kernel/pcr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ int __init pcr_arch_init(void)
359359
* counter overflow interrupt so we can't make use of
360360
* their hardware currently.
361361
*/
362-
/* fallthrough */
362+
fallthrough;
363363
default:
364364
err = -ENODEV;
365365
goto out_unregister;

arch/sparc/kernel/prom_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ void __init of_console_init(void)
224224

225225
case PROMDEV_TTYB:
226226
skip = 1;
227-
/* FALLTHRU */
227+
fallthrough;
228228

229229
case PROMDEV_TTYA:
230230
type = "serial";

arch/sparc/kernel/signal32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ static inline void syscall_restart32(unsigned long orig_i0, struct pt_regs *regs
646646
case ERESTARTSYS:
647647
if (!(sa->sa_flags & SA_RESTART))
648648
goto no_system_call_restart;
649-
/* fallthrough */
649+
fallthrough;
650650
case ERESTARTNOINTR:
651651
regs->u_regs[UREG_I0] = orig_i0;
652652
regs->tpc -= 4;
@@ -686,7 +686,7 @@ void do_signal32(struct pt_regs * regs)
686686
regs->tpc -= 4;
687687
regs->tnpc -= 4;
688688
pt_regs_clear_syscall(regs);
689-
/* fall through */
689+
fallthrough;
690690
case ERESTART_RESTARTBLOCK:
691691
regs->u_regs[UREG_G1] = __NR_restart_syscall;
692692
regs->tpc -= 4;

arch/sparc/kernel/signal_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
441441
case ERESTARTSYS:
442442
if (!(sa->sa_flags & SA_RESTART))
443443
goto no_system_call_restart;
444-
/* fallthrough */
444+
fallthrough;
445445
case ERESTARTNOINTR:
446446
regs->u_regs[UREG_I0] = orig_i0;
447447
regs->pc -= 4;
@@ -507,7 +507,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
507507
regs->pc -= 4;
508508
regs->npc -= 4;
509509
pt_regs_clear_syscall(regs);
510-
/* fall through */
510+
fallthrough;
511511
case ERESTART_RESTARTBLOCK:
512512
regs->u_regs[UREG_G1] = __NR_restart_syscall;
513513
regs->pc -= 4;

arch/sparc/kernel/signal_64.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
461461
case ERESTARTSYS:
462462
if (!(sa->sa_flags & SA_RESTART))
463463
goto no_system_call_restart;
464-
/* fallthrough */
464+
fallthrough;
465465
case ERESTARTNOINTR:
466466
regs->u_regs[UREG_I0] = orig_i0;
467467
regs->tpc -= 4;
@@ -532,7 +532,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
532532
regs->tpc -= 4;
533533
regs->tnpc -= 4;
534534
pt_regs_clear_syscall(regs);
535-
/* fall through */
535+
fallthrough;
536536
case ERESTART_RESTARTBLOCK:
537537
regs->u_regs[UREG_G1] = __NR_restart_syscall;
538538
regs->tpc -= 4;

arch/sparc/math-emu/math_32.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
359359
*pfsr |= (6 << 14);
360360
return 0; /* simulate invalid_fp_register exception */
361361
}
362-
/* fall through */
362+
fallthrough;
363363
case 2:
364364
if (freg & 1) { /* doublewords must have bit 5 zeroed */
365365
*pfsr |= (6 << 14);
@@ -380,7 +380,7 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
380380
*pfsr |= (6 << 14);
381381
return 0; /* simulate invalid_fp_register exception */
382382
}
383-
/* fall through */
383+
fallthrough;
384384
case 2:
385385
if (freg & 1) { /* doublewords must have bit 5 zeroed */
386386
*pfsr |= (6 << 14);
@@ -408,13 +408,13 @@ static int do_one_mathemu(u32 insn, unsigned long *pfsr, unsigned long *fregs)
408408
*pfsr |= (6 << 14);
409409
return 0; /* simulate invalid_fp_register exception */
410410
}
411-
/* fall through */
411+
fallthrough;
412412
case 2:
413413
if (freg & 1) { /* doublewords must have bit 5 zeroed */
414414
*pfsr |= (6 << 14);
415415
return 0;
416416
}
417-
/* fall through */
417+
fallthrough;
418418
case 1:
419419
rd = (void *)&fregs[freg];
420420
break;

0 commit comments

Comments
 (0)