summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/jhash.h
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@netfilter.org>2020-09-20 22:48:28 +0200
committerJozsef Kadlecsik <kadlec@netfilter.org>2020-09-20 22:48:28 +0200
commitdfdbad53f9c5a7bc3f357b53f11a840c8fda3635 (patch)
tree215bb791e4b6583be951aee327da86f034918023 /kernel/include/linux/jhash.h
parent3d5ffca9db521d5bd8868760ee1c5263e0d25c1d (diff)
Use fallthrough pseudo-keyword in the package copy of <linux/jhash.h> too
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Diffstat (limited to 'kernel/include/linux/jhash.h')
-rw-r--r--kernel/include/linux/jhash.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/kernel/include/linux/jhash.h b/kernel/include/linux/jhash.h
index c700a77..5e578b1 100644
--- a/kernel/include/linux/jhash.h
+++ b/kernel/include/linux/jhash.h
@@ -87,17 +87,17 @@ static inline u32 jhash(const void *key, u32 length, u32 initval)
/* Last block: affect all 32 bits of (c) */
/* All the case statements fall through */
switch (length) {
- case 12: c += (u32)k[11]<<24;
- case 11: c += (u32)k[10]<<16;
- case 10: c += (u32)k[9]<<8;
- case 9: c += k[8];
- case 8: b += (u32)k[7]<<24;
- case 7: b += (u32)k[6]<<16;
- case 6: b += (u32)k[5]<<8;
- case 5: b += k[4];
- case 4: a += (u32)k[3]<<24;
- case 3: a += (u32)k[2]<<16;
- case 2: a += (u32)k[1]<<8;
+ case 12: c += (u32)k[11]<<24; fallthrough;
+ case 11: c += (u32)k[10]<<16; fallthrough;
+ case 10: c += (u32)k[9]<<8; fallthrough;
+ case 9: c += k[8]; fallthrough;
+ case 8: b += (u32)k[7]<<24; fallthrough;
+ case 7: b += (u32)k[6]<<16; fallthrough;
+ case 6: b += (u32)k[5]<<8; fallthrough;
+ case 5: b += k[4]; fallthrough;
+ case 4: a += (u32)k[3]<<24; fallthrough;
+ case 3: a += (u32)k[2]<<16; fallthrough;
+ case 2: a += (u32)k[1]<<8; fallthrough;
case 1: a += k[0];
__jhash_final(a, b, c);
case 0: /* Nothing left to add */
@@ -133,8 +133,8 @@ static inline u32 jhash2(const u32 *k, u32 length, u32 initval)
/* Handle the last 3 u32's: all the case statements fall through */
switch (length) {
- case 3: c += k[2];
- case 2: b += k[1];
+ case 3: c += k[2]; fallthrough;
+ case 2: b += k[1]; fallthrough;
case 1: a += k[0];
__jhash_final(a, b, c);
case 0: /* Nothing left to add */