diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2019-05-15 01:23:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-15 11:16:14 -0400 |
commit | 89963adcdb430e047f4c03ac3ed6ce9aa42a595c (patch) | |
tree | e14a1da3e87b2d538dfbb3f97afe60af46dbe395 | |
parent | 5ac94332248ee017964ba368cdda4ce647e3aba7 (diff) |
kernel/compat.c: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
This patch aims to suppress 3 missing-break-in-switch false positives
on some architectures.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: Gustavo A. R. Silva <gustavo@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/compat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index d8a36c6ad7c9..b5f7063c0db6 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -346,8 +346,11 @@ get_compat_sigset(sigset_t *set, const compat_sigset_t __user *compat) | |||
346 | return -EFAULT; | 346 | return -EFAULT; |
347 | switch (_NSIG_WORDS) { | 347 | switch (_NSIG_WORDS) { |
348 | case 4: set->sig[3] = v.sig[6] | (((long)v.sig[7]) << 32 ); | 348 | case 4: set->sig[3] = v.sig[6] | (((long)v.sig[7]) << 32 ); |
349 | /* fall through */ | ||
349 | case 3: set->sig[2] = v.sig[4] | (((long)v.sig[5]) << 32 ); | 350 | case 3: set->sig[2] = v.sig[4] | (((long)v.sig[5]) << 32 ); |
351 | /* fall through */ | ||
350 | case 2: set->sig[1] = v.sig[2] | (((long)v.sig[3]) << 32 ); | 352 | case 2: set->sig[1] = v.sig[2] | (((long)v.sig[3]) << 32 ); |
353 | /* fall through */ | ||
351 | case 1: set->sig[0] = v.sig[0] | (((long)v.sig[1]) << 32 ); | 354 | case 1: set->sig[0] = v.sig[0] | (((long)v.sig[1]) << 32 ); |
352 | } | 355 | } |
353 | #else | 356 | #else |