]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: module: Mark expected switch fall-through
authorAnders Roxell <anders.roxell@linaro.org>
Fri, 26 Jul 2019 11:27:21 +0000 (13:27 +0200)
committerWill Deacon <will@kernel.org>
Mon, 29 Jul 2019 10:59:36 +0000 (11:59 +0100)
commitdb0cdc6802d3fdc83531e3643682b1150435ab5f
tree9dd3b82175b388be02bcfa98eff4c6b047bfc753
parent1726a6f71757d0e54bd5331f229795e06f3402cf
arm64: module: Mark expected switch fall-through

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

../arch/arm64/kernel/module.c: In function ‘apply_relocate_add’:
../arch/arm64/kernel/module.c:316:19: warning: this statement may fall
 through [-Wimplicit-fallthrough=]
    overflow_check = false;
    ~~~~~~~~~~~~~~~^~~~~~~
../arch/arm64/kernel/module.c:317:3: note: here
   case R_AARCH64_MOVW_UABS_G0:
   ^~~~
../arch/arm64/kernel/module.c:322:19: warning: this statement may fall
 through [-Wimplicit-fallthrough=]
    overflow_check = false;
    ~~~~~~~~~~~~~~~^~~~~~~
../arch/arm64/kernel/module.c:323:3: note: here
   case R_AARCH64_MOVW_UABS_G1:
   ^~~~

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/module.c