]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
Use fallthrough pseudo-keyword in the package copy of <linux/jhash.h> too
authorJozsef Kadlecsik <kadlec@netfilter.org>
Sun, 20 Sep 2020 20:48:28 +0000 (22:48 +0200)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Sun, 20 Sep 2020 20:48:28 +0000 (22:48 +0200)
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
kernel/include/linux/jhash.h

index c700a771f9be350b4a151aca4d8c0010dd199600..5e578b1d297223cd0af30eb07d8d3b9a56c9b8ea 100644 (file)
@@ -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 */