diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2020-08-11 17:37:33 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-08-26 19:47:20 +0300 |
commit | 612ad0785dd5161dc311b10bd26038553a378386 (patch) | |
tree | ca0efb8b86295837662481f85499224ae01e2d09 /arch/s390/include/asm | |
parent | 614b4f5d0fa3f622cfcc899491d8a3e6af3d4dc5 (diff) | |
download | linux-612ad0785dd5161dc311b10bd26038553a378386.tar.xz |
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/asm')
-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; } |