diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-06-29 16:31:40 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-06-29 17:32:43 +0200 |
commit | 50a4b05609929003ce98987bb901ee10fe21fb20 (patch) | |
tree | 4274a0b27430a7c7fbb998299d626d317d7c852b /arch/arm64 | |
parent | arm64: fix endianness annotation in acpi_parking_protocol.c (diff) | |
download | linux-50a4b05609929003ce98987bb901ee10fe21fb20.tar.xz linux-50a4b05609929003ce98987bb901ee10fe21fb20.zip |
arm64: add missing conversion to __wsum in ip_fast_csum()
ARM64 implementation of ip_fast_csum() do most of the work
in 128 or 64 bit and call csum_fold() to finalize. csum_fold()
itself take a __wsum argument, to insure that this value is
always a 32bit native-order value.
Fix this by adding the sadly needed '__force' to cast the native
'sum' to the type '__wsum'.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/asm/checksum.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/checksum.h b/arch/arm64/include/asm/checksum.h index 09f65339d66d..0b6f5a7d4027 100644 --- a/arch/arm64/include/asm/checksum.h +++ b/arch/arm64/include/asm/checksum.h @@ -42,7 +42,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) } while (--ihl); sum += ((sum >> 32) | (sum << 32)); - return csum_fold(sum >> 32); + return csum_fold((__force u32)(sum >> 32)); } #define ip_fast_csum ip_fast_csum |