diff options
Diffstat (limited to 'include/linux/jhash.h')
-rw-r--r-- | include/linux/jhash.h | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/include/linux/jhash.h b/include/linux/jhash.h index 348c6f47e4cc..8037850f3104 100644 --- a/include/linux/jhash.h +++ b/include/linux/jhash.h | |||
@@ -85,19 +85,18 @@ static inline u32 jhash(const void *key, u32 length, u32 initval) | |||
85 | k += 12; | 85 | k += 12; |
86 | } | 86 | } |
87 | /* Last block: affect all 32 bits of (c) */ | 87 | /* Last block: affect all 32 bits of (c) */ |
88 | /* All the case statements fall through */ | ||
89 | switch (length) { | 88 | switch (length) { |
90 | case 12: c += (u32)k[11]<<24; | 89 | case 12: c += (u32)k[11]<<24; /* fall through */ |
91 | case 11: c += (u32)k[10]<<16; | 90 | case 11: c += (u32)k[10]<<16; /* fall through */ |
92 | case 10: c += (u32)k[9]<<8; | 91 | case 10: c += (u32)k[9]<<8; /* fall through */ |
93 | case 9: c += k[8]; | 92 | case 9: c += k[8]; /* fall through */ |
94 | case 8: b += (u32)k[7]<<24; | 93 | case 8: b += (u32)k[7]<<24; /* fall through */ |
95 | case 7: b += (u32)k[6]<<16; | 94 | case 7: b += (u32)k[6]<<16; /* fall through */ |
96 | case 6: b += (u32)k[5]<<8; | 95 | case 6: b += (u32)k[5]<<8; /* fall through */ |
97 | case 5: b += k[4]; | 96 | case 5: b += k[4]; /* fall through */ |
98 | case 4: a += (u32)k[3]<<24; | 97 | case 4: a += (u32)k[3]<<24; /* fall through */ |
99 | case 3: a += (u32)k[2]<<16; | 98 | case 3: a += (u32)k[2]<<16; /* fall through */ |
100 | case 2: a += (u32)k[1]<<8; | 99 | case 2: a += (u32)k[1]<<8; /* fall through */ |
101 | case 1: a += k[0]; | 100 | case 1: a += k[0]; |
102 | __jhash_final(a, b, c); | 101 | __jhash_final(a, b, c); |
103 | case 0: /* Nothing left to add */ | 102 | case 0: /* Nothing left to add */ |
@@ -131,10 +130,10 @@ static inline u32 jhash2(const u32 *k, u32 length, u32 initval) | |||
131 | k += 3; | 130 | k += 3; |
132 | } | 131 | } |
133 | 132 | ||
134 | /* Handle the last 3 u32's: all the case statements fall through */ | 133 | /* Handle the last 3 u32's */ |
135 | switch (length) { | 134 | switch (length) { |
136 | case 3: c += k[2]; | 135 | case 3: c += k[2]; /* fall through */ |
137 | case 2: b += k[1]; | 136 | case 2: b += k[1]; /* fall through */ |
138 | case 1: a += k[0]; | 137 | case 1: a += k[0]; |
139 | __jhash_final(a, b, c); | 138 | __jhash_final(a, b, c); |
140 | case 0: /* Nothing left to add */ | 139 | case 0: /* Nothing left to add */ |