mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-06 19:02:48 +00:00
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: Alexander Lobakin <alobakin@pm.me> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
7b5f96949d
commit
ff711d67b1
@ -113,9 +113,9 @@ static inline __sum16 csum_fold(__wsum csum)
|
||||
u32 sum = (__force u32)csum;
|
||||
|
||||
sum += (sum << 16);
|
||||
csum = (sum < csum);
|
||||
csum = (__force __wsum)(sum < (__force u32)csum);
|
||||
sum >>= 16;
|
||||
sum += csum;
|
||||
sum += (__force u32)csum;
|
||||
|
||||
return (__force __sum16)~sum;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user