rco: Clean up casting errors
authorTom Herbert <tom@herbertland.com>
Thu, 10 Dec 2015 20:37:44 +0000 (12:37 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Dec 2015 04:57:45 +0000 (23:57 -0500)
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>
include/net/checksum.h

index 9fcaedf994ee2ba5db20a0635c78ceed06f57cc1..10a16b5bd1c70b58ee6e02b8515725a93afc5d18 100644 (file)
@@ -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;