]> git.ipfire.org Git - thirdparty/linux.git/commit
arm64: smp: Mark expected switch fall-through
authorAnders Roxell <anders.roxell@linaro.org>
Fri, 26 Jul 2019 11:27:25 +0000 (13:27 +0200)
committerWill Deacon <will@kernel.org>
Mon, 29 Jul 2019 10:59:30 +0000 (11:59 +0100)
commit6655473920129eb2dd1dded147722316294a699a
tree5686f57bf3818ff9891341dcfb9408c42b939bbc
parent75a382f1c9e5092db10ad1e2111633d61b65e578
arm64: smp: Mark expected switch fall-through

When fall-through warnings was enabled by default the following warning
was starting to show up:

In file included from ../include/linux/kernel.h:15,
                 from ../include/linux/list.h:9,
                 from ../include/linux/kobject.h:19,
                 from ../include/linux/of.h:17,
                 from ../include/linux/irqdomain.h:35,
                 from ../include/linux/acpi.h:13,
                 from ../arch/arm64/kernel/smp.c:9:
../arch/arm64/kernel/smp.c: In function ‘__cpu_up’:
../include/linux/printk.h:302:2: warning: this statement may fall
 through [-Wimplicit-fallthrough=]
  printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../arch/arm64/kernel/smp.c:156:4: note: in expansion of macro ‘pr_crit’
    pr_crit("CPU%u: may not have shut down cleanly\n", cpu);
    ^~~~~~~
../arch/arm64/kernel/smp.c:157:3: note: here
   case CPU_STUCK_IN_KERNEL:
   ^~~~

Rework so that the compiler doesn't warn about fall-through.

Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/smp.c