Skip to content

Commit 93417a3

Browse files
GustavoARSilvaKAGA-KOKO
authored andcommitted
genirq: Mark expected switch case fall-through
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. With -Wimplicit-fallthrough added to CFLAGS: kernel/irq/manage.c: In function ‘irq_do_set_affinity’: kernel/irq/manage.c:198:3: warning: this statement may fall through [-Wimplicit-fallthrough=] cpumask_copy(desc->irq_common_data.affinity, mask); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/irq/manage.c:199:2: note: here case IRQ_SET_MASK_OK_NOCOPY: ^~~~ Annotate it. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Kees Cook <keescook@chromium.org> Link: https://lkml.kernel.org/r/20190228213714.GA9246@embeddedor
1 parent bb2e320 commit 93417a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/irq/manage.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
196196
case IRQ_SET_MASK_OK:
197197
case IRQ_SET_MASK_OK_DONE:
198198
cpumask_copy(desc->irq_common_data.affinity, mask);
199+
/* fall through */
199200
case IRQ_SET_MASK_OK_NOCOPY:
200201
irq_validate_effective_affinity(data);
201202
irq_set_thread_affinity(desc);

0 commit comments

Comments
 (0)