Commit ff711d67 authored by Alexander Lobakin's avatar Alexander Lobakin Committed by Thomas Bogendoerfer

MIPS: checksum: fix sparse flooding on asm/checksum.h

csum_fold() in MIPS' asm/checksum.h is another source of sparse flooding
when building different networking source code.
The thing is that only half of __wsum <--> u32 casts inside the function
is forced, which is insufficient.
Add all necessary forced typecasting to stop floods and simplify actual
bug hunting.
Signed-off-by: default avatarAlexander Lobakin <alobakin@pm.me>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 7b5f9694
...@@ -113,9 +113,9 @@ static inline __sum16 csum_fold(__wsum csum) ...@@ -113,9 +113,9 @@ static inline __sum16 csum_fold(__wsum csum)
u32 sum = (__force u32)csum; u32 sum = (__force u32)csum;
sum += (sum << 16); sum += (sum << 16);
csum = (sum < csum); csum = (__force __wsum)(sum < (__force u32)csum);
sum >>= 16; sum >>= 16;
sum += csum; sum += (__force u32)csum;
return (__force __sum16)~sum; return (__force __sum16)~sum;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment