treewide: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
This commit is contained in:
@@ -86,17 +86,17 @@ static inline u32 jhash(const void *key, u32 length, u32 initval)
|
||||
}
|
||||
/* Last block: affect all 32 bits of (c) */
|
||||
switch (length) {
|
||||
case 12: c += (u32)k[11]<<24; /* fall through */
|
||||
case 11: c += (u32)k[10]<<16; /* fall through */
|
||||
case 10: c += (u32)k[9]<<8; /* fall through */
|
||||
case 9: c += k[8]; /* fall through */
|
||||
case 8: b += (u32)k[7]<<24; /* fall through */
|
||||
case 7: b += (u32)k[6]<<16; /* fall through */
|
||||
case 6: b += (u32)k[5]<<8; /* fall through */
|
||||
case 5: b += k[4]; /* fall through */
|
||||
case 4: a += (u32)k[3]<<24; /* fall through */
|
||||
case 3: a += (u32)k[2]<<16; /* fall through */
|
||||
case 2: a += (u32)k[1]<<8; /* fall through */
|
||||
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 */
|
||||
@@ -132,8 +132,8 @@ static inline u32 jhash2(const u32 *k, u32 length, u32 initval)
|
||||
|
||||
/* Handle the last 3 u32's */
|
||||
switch (length) {
|
||||
case 3: c += k[2]; /* fall through */
|
||||
case 2: b += k[1]; /* fall through */
|
||||
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 */
|
||||
|
Reference in New Issue
Block a user