hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/linux/jhash.h
....@@ -5,7 +5,7 @@
55 *
66 * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net)
77 *
8
- * http://burtleburtle.net/bob/hash/
8
+ * https://burtleburtle.net/bob/hash/
99 *
1010 * These are the credits from Bob's sources:
1111 *
....@@ -17,7 +17,7 @@
1717 * if SELF_TEST is defined. You can use this free for any purpose. It's in
1818 * the public domain. It has no warranty.
1919 *
20
- * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu)
20
+ * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@netfilter.org)
2121 *
2222 * I've modified Bob's hash to be useful in the Linux kernel, and
2323 * any bugs present are my fault.
....@@ -86,19 +86,20 @@
8686 }
8787 /* Last block: affect all 32 bits of (c) */
8888 switch (length) {
89
- case 12: c += (u32)k[11]<<24; /* fall through */
90
- case 11: c += (u32)k[10]<<16; /* fall through */
91
- case 10: c += (u32)k[9]<<8; /* fall through */
92
- case 9: c += k[8]; /* fall through */
93
- case 8: b += (u32)k[7]<<24; /* fall through */
94
- case 7: b += (u32)k[6]<<16; /* fall through */
95
- case 6: b += (u32)k[5]<<8; /* fall through */
96
- case 5: b += k[4]; /* fall through */
97
- case 4: a += (u32)k[3]<<24; /* fall through */
98
- case 3: a += (u32)k[2]<<16; /* fall through */
99
- case 2: a += (u32)k[1]<<8; /* fall through */
89
+ case 12: c += (u32)k[11]<<24; fallthrough;
90
+ case 11: c += (u32)k[10]<<16; fallthrough;
91
+ case 10: c += (u32)k[9]<<8; fallthrough;
92
+ case 9: c += k[8]; fallthrough;
93
+ case 8: b += (u32)k[7]<<24; fallthrough;
94
+ case 7: b += (u32)k[6]<<16; fallthrough;
95
+ case 6: b += (u32)k[5]<<8; fallthrough;
96
+ case 5: b += k[4]; fallthrough;
97
+ case 4: a += (u32)k[3]<<24; fallthrough;
98
+ case 3: a += (u32)k[2]<<16; fallthrough;
99
+ case 2: a += (u32)k[1]<<8; fallthrough;
100100 case 1: a += k[0];
101101 __jhash_final(a, b, c);
102
+ break;
102103 case 0: /* Nothing left to add */
103104 break;
104105 }
....@@ -132,10 +133,11 @@
132133
133134 /* Handle the last 3 u32's */
134135 switch (length) {
135
- case 3: c += k[2]; /* fall through */
136
- case 2: b += k[1]; /* fall through */
136
+ case 3: c += k[2]; fallthrough;
137
+ case 2: b += k[1]; fallthrough;
137138 case 1: a += k[0];
138139 __jhash_final(a, b, c);
140
+ break;
139141 case 0: /* Nothing left to add */
140142 break;
141143 }