Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

timers: Mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where fall through is indeed expected.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Link: https://lkml.kernel.org/r/20190123081413.GA3949@embeddedor

authored by

Gustavo A. R. Silva and committed by
Thomas Gleixner
75b710af ae503ab0

+3 -2
+1 -1
kernel/time/hrtimer.c
··· 364 364 switch (state) { 365 365 case ODEBUG_STATE_ACTIVE: 366 366 WARN_ON(1); 367 - 367 + /* fall through */ 368 368 default: 369 369 return false; 370 370 }
+1
kernel/time/tick-broadcast.c
··· 375 375 switch (mode) { 376 376 case TICK_BROADCAST_FORCE: 377 377 tick_broadcast_forced = 1; 378 + /* fall through */ 378 379 case TICK_BROADCAST_ON: 379 380 cpumask_set_cpu(cpu, tick_broadcast_on); 380 381 if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_mask)) {
+1 -1
kernel/time/timer.c
··· 647 647 648 648 case ODEBUG_STATE_ACTIVE: 649 649 WARN_ON(1); 650 - 650 + /* fall through */ 651 651 default: 652 652 return false; 653 653 }