]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
csum: eliminate sparse warning in remcsum_unadjust()
authorLance Richardson <lrichard@redhat.com>
Wed, 18 Jan 2017 20:14:56 +0000 (15:14 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Jan 2017 17:12:13 +0000 (12:12 -0500)
Cast second parameter of csum_sub() from __sum16 to __wsum.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/checksum.h

index 35d0fabd2782618603bcd051c34750db53b9742f..aef2b2bb6603fa5c308c7aca4c1ef9d47d6496f9 100644 (file)
@@ -179,7 +179,7 @@ static inline __wsum remcsum_adjust(void *ptr, __wsum csum,
 
 static inline void remcsum_unadjust(__sum16 *psum, __wsum delta)
 {
-       *psum = csum_fold(csum_sub(delta, *psum));
+       *psum = csum_fold(csum_sub(delta, (__force __wsum)*psum));
 }
 
 #endif