summaryrefslogtreecommitdiffstats
path: root/include/net/checksum.h
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-12-10 12:37:44 -0800
committerDavid S. Miller <davem@davemloft.net>2015-12-13 23:57:45 -0500
commit369620a09bc5ab867342d51f1820c66b00d78a2c (patch)
tree673ef1db24ef05921e7fca21b22812d7c920209d /include/net/checksum.h
parent823aeda4cf3eb63af44159a2b75964367f5a61a8 (diff)
downloadlinux-369620a09bc5ab867342d51f1820c66b00d78a2c.tar.bz2
rco: Clean up casting errors
Fixe a couple of cast errors found by sparse. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/checksum.h')
-rw-r--r--include/net/checksum.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/checksum.h b/include/net/checksum.h
index 9fcaedf994ee..10a16b5bd1c7 100644
--- a/include/net/checksum.h
+++ b/include/net/checksum.h
@@ -165,7 +165,8 @@ static inline __wsum remcsum_adjust(void *ptr, __wsum csum,
csum = csum_sub(csum, csum_partial(ptr, start, 0));
/* Set derived checksum in packet */
- delta = csum_sub(csum_fold(csum), *psum);
+ delta = csum_sub((__force __wsum)csum_fold(csum),
+ (__force __wsum)*psum);
*psum = csum_fold(csum);
return delta;