]> git.baikalelectronics.ru Git - kernel.git/commitdiff
fcntl: Fix unreachable code in do_fcntl()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 12 Jul 2021 16:09:13 +0000 (11:09 -0500)
committerGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 12 Jul 2021 16:09:13 +0000 (11:09 -0500)
Fix the following warning:

fs/fcntl.c:373: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>
fs/fcntl.c

index dfc72f15be7fcd4c2a906f2a565d9a95115a0e88..f946bec8f1f1b92fed4b851be2053ab7b0cc84d6 100644 (file)
@@ -369,8 +369,8 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
        /* 32-bit arches must use fcntl64() */
        case F_OFD_SETLK:
        case F_OFD_SETLKW:
-#endif
                fallthrough;
+#endif
        case F_SETLK:
        case F_SETLKW:
                if (copy_from_user(&flock, argp, sizeof(flock)))