netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] csum: eliminate sparse warning in remcsum_unadjust()
@ 2017-01-18 20:14 Lance Richardson
  2017-01-20 17:12 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Lance Richardson @ 2017-01-18 20:14 UTC (permalink / raw)
  To: netdev

Cast second parameter of csum_sub() from __sum16 to __wsum.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
---
 include/net/checksum.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/checksum.h b/include/net/checksum.h
index 35d0fab..aef2b2b 100644
--- a/include/net/checksum.h
+++ b/include/net/checksum.h
@@ -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
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] csum: eliminate sparse warning in remcsum_unadjust()
  2017-01-18 20:14 [PATCH net-next] csum: eliminate sparse warning in remcsum_unadjust() Lance Richardson
@ 2017-01-20 17:12 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-01-20 17:12 UTC (permalink / raw)
  To: lrichard; +Cc: netdev

From: Lance Richardson <lrichard@redhat.com>
Date: Wed, 18 Jan 2017 15:14:56 -0500

> Cast second parameter of csum_sub() from __sum16 to __wsum.
> 
> Signed-off-by: Lance Richardson <lrichard@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-20 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-18 20:14 [PATCH net-next] csum: eliminate sparse warning in remcsum_unadjust() Lance Richardson
2017-01-20 17:12 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).