mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"
This reverts commit 6a9dc5fd61
("lib: Revert use of fallthrough
pseudo-keyword in lib/")
Now that we can build arch/powerpc/boot/ free of -Wimplicit-fallthrough,
re-enable these fixes for lib/.
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://github.com/ClangBuiltLinux/linux/issues/236
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
This commit is contained in:
parent
77433830ed
commit
4c1ca831ad
16 changed files with 64 additions and 64 deletions
|
@ -68,11 +68,11 @@ u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key)
|
|||
bytemask_from_count(left)));
|
||||
#else
|
||||
switch (left) {
|
||||
case 7: b |= ((u64)end[6]) << 48; /* fall through */
|
||||
case 6: b |= ((u64)end[5]) << 40; /* fall through */
|
||||
case 5: b |= ((u64)end[4]) << 32; /* fall through */
|
||||
case 7: b |= ((u64)end[6]) << 48; fallthrough;
|
||||
case 6: b |= ((u64)end[5]) << 40; fallthrough;
|
||||
case 5: b |= ((u64)end[4]) << 32; fallthrough;
|
||||
case 4: b |= le32_to_cpup(data); break;
|
||||
case 3: b |= ((u64)end[2]) << 16; /* fall through */
|
||||
case 3: b |= ((u64)end[2]) << 16; fallthrough;
|
||||
case 2: b |= le16_to_cpup(data); break;
|
||||
case 1: b |= end[0];
|
||||
}
|
||||
|
@ -101,11 +101,11 @@ u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key)
|
|||
bytemask_from_count(left)));
|
||||
#else
|
||||
switch (left) {
|
||||
case 7: b |= ((u64)end[6]) << 48; /* fall through */
|
||||
case 6: b |= ((u64)end[5]) << 40; /* fall through */
|
||||
case 5: b |= ((u64)end[4]) << 32; /* fall through */
|
||||
case 7: b |= ((u64)end[6]) << 48; fallthrough;
|
||||
case 6: b |= ((u64)end[5]) << 40; fallthrough;
|
||||
case 5: b |= ((u64)end[4]) << 32; fallthrough;
|
||||
case 4: b |= get_unaligned_le32(end); break;
|
||||
case 3: b |= ((u64)end[2]) << 16; /* fall through */
|
||||
case 3: b |= ((u64)end[2]) << 16; fallthrough;
|
||||
case 2: b |= get_unaligned_le16(end); break;
|
||||
case 1: b |= end[0];
|
||||
}
|
||||
|
@ -268,11 +268,11 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key)
|
|||
bytemask_from_count(left)));
|
||||
#else
|
||||
switch (left) {
|
||||
case 7: b |= ((u64)end[6]) << 48; /* fall through */
|
||||
case 6: b |= ((u64)end[5]) << 40; /* fall through */
|
||||
case 5: b |= ((u64)end[4]) << 32; /* fall through */
|
||||
case 7: b |= ((u64)end[6]) << 48; fallthrough;
|
||||
case 6: b |= ((u64)end[5]) << 40; fallthrough;
|
||||
case 5: b |= ((u64)end[4]) << 32; fallthrough;
|
||||
case 4: b |= le32_to_cpup(data); break;
|
||||
case 3: b |= ((u64)end[2]) << 16; /* fall through */
|
||||
case 3: b |= ((u64)end[2]) << 16; fallthrough;
|
||||
case 2: b |= le16_to_cpup(data); break;
|
||||
case 1: b |= end[0];
|
||||
}
|
||||
|
@ -301,11 +301,11 @@ u32 __hsiphash_unaligned(const void *data, size_t len,
|
|||
bytemask_from_count(left)));
|
||||
#else
|
||||
switch (left) {
|
||||
case 7: b |= ((u64)end[6]) << 48; /* fall through */
|
||||
case 6: b |= ((u64)end[5]) << 40; /* fall through */
|
||||
case 5: b |= ((u64)end[4]) << 32; /* fall through */
|
||||
case 7: b |= ((u64)end[6]) << 48; fallthrough;
|
||||
case 6: b |= ((u64)end[5]) << 40; fallthrough;
|
||||
case 5: b |= ((u64)end[4]) << 32; fallthrough;
|
||||
case 4: b |= get_unaligned_le32(end); break;
|
||||
case 3: b |= ((u64)end[2]) << 16; /* fall through */
|
||||
case 3: b |= ((u64)end[2]) << 16; fallthrough;
|
||||
case 2: b |= get_unaligned_le16(end); break;
|
||||
case 1: b |= end[0];
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key)
|
|||
v0 ^= m;
|
||||
}
|
||||
switch (left) {
|
||||
case 3: b |= ((u32)end[2]) << 16; /* fall through */
|
||||
case 3: b |= ((u32)end[2]) << 16; fallthrough;
|
||||
case 2: b |= le16_to_cpup(data); break;
|
||||
case 1: b |= end[0];
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ u32 __hsiphash_unaligned(const void *data, size_t len,
|
|||
v0 ^= m;
|
||||
}
|
||||
switch (left) {
|
||||
case 3: b |= ((u32)end[2]) << 16; /* fall through */
|
||||
case 3: b |= ((u32)end[2]) << 16; fallthrough;
|
||||
case 2: b |= get_unaligned_le16(end); break;
|
||||
case 1: b |= end[0];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue