diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2020-08-11 16:37:33 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-08-26 18:47:20 +0200 |
commit | 612ad0785dd5161dc311b10bd26038553a378386 (patch) | |
tree | ca0efb8b86295837662481f85499224ae01e2d09 /arch/s390/include | |
parent | 614b4f5d0fa3f622cfcc899491d8a3e6af3d4dc5 (diff) |
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 <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/checksum.h | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |