mtd: cfi_util: Fix unreachable code issue
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 12 Jul 2021 16:13:49 +0000 (11:13 -0500)
committerGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 12 Jul 2021 16:15:28 +0000 (11:15 -0500)
commit1eb5f4a3ddd949af1abe947c02ad990c013dd620
treedd4f78261cb5e3bc1b1f1bc845ff19a1582920c2
parente8865537a68bb3032f449f5eb108fa8cd76ebb6d
mtd: cfi_util: Fix unreachable code issue

Fix the following warning:

drivers/mtd/chips/cfi_util.c:112:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
                   fallthrough;
                   ^
   include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough'
   # define fallthrough                    __attribute__((__fallthrough__))
                                           ^
   drivers/mtd/chips/cfi_util.c:168:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
                   fallthrough;
                   ^
   include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough'
   # define fallthrough                    __attribute__((__fallthrough__))

by placing the fallthrough; statement inside ifdeffery.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
drivers/mtd/chips/cfi_util.c