aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-10-30 18:05:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-31 11:54:13 -0400
commit89976005536c47a788bdd6cef5a4e9fef3c0de32 (patch)
tree757208d8912f27c2d267af779d0a90d7cf386016
parent048e513d876113ebc2352ac2add66e4bfec67037 (diff)
include/linux/compat.h: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Link: http://lkml.kernel.org/r/20181013115048.GA3262@embeddedor.com Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/compat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index d30e4dbd4be2..06e77473f175 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -488,8 +488,11 @@ put_compat_sigset(compat_sigset_t __user *compat, const sigset_t *set,
488 compat_sigset_t v; 488 compat_sigset_t v;
489 switch (_NSIG_WORDS) { 489 switch (_NSIG_WORDS) {
490 case 4: v.sig[7] = (set->sig[3] >> 32); v.sig[6] = set->sig[3]; 490 case 4: v.sig[7] = (set->sig[3] >> 32); v.sig[6] = set->sig[3];
491 /* fall through */
491 case 3: v.sig[5] = (set->sig[2] >> 32); v.sig[4] = set->sig[2]; 492 case 3: v.sig[5] = (set->sig[2] >> 32); v.sig[4] = set->sig[2];
493 /* fall through */
492 case 2: v.sig[3] = (set->sig[1] >> 32); v.sig[2] = set->sig[1]; 494 case 2: v.sig[3] = (set->sig[1] >> 32); v.sig[2] = set->sig[1];
495 /* fall through */
493 case 1: v.sig[1] = (set->sig[0] >> 32); v.sig[0] = set->sig[0]; 496 case 1: v.sig[1] = (set->sig[0] >> 32); v.sig[0] = set->sig[0];
494 } 497 }
495 return copy_to_user(compat, &v, size) ? -EFAULT : 0; 498 return copy_to_user(compat, &v, size) ? -EFAULT : 0;