From 612ad0785dd5161dc311b10bd26038553a378386 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 11 Aug 2020 16:37:33 +0200 Subject: s390/checksum: have consistent calculations Use "|" instead of "+" within csum_fold() for consistency reasons, like in the rest of the file. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- arch/s390/include/asm/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/s390/include') diff --git a/arch/s390/include/asm/checksum.h b/arch/s390/include/asm/checksum.h index 8bc6bed4715b..de97ae691060 100644 --- a/arch/s390/include/asm/checksum.h +++ b/arch/s390/include/asm/checksum.h @@ -54,7 +54,7 @@ static inline __sum16 csum_fold(__wsum sum) { u32 csum = (__force u32) sum; - csum += (csum >> 16) + (csum << 16); + csum += (csum >> 16) | (csum << 16); csum >>= 16; return (__force __sum16) ~csum; } -- cgit v1.2.3