netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clean up sparse cast warning in do_ip_getsockopt
@ 2014-07-20 11:30 Karoly Kemeny
  2014-07-21  5:22 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Karoly Kemeny @ 2014-07-20 11:30 UTC (permalink / raw)
  To: jmorris, netdev, davem

There is a sparse warning because of the implicit pointer cast in
do_ip_getsockopt.

Signed-off-by: Karoly Kemeny <karoly.kemeny@gmail.com>
---
 net/ipv4/ip_sockglue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 64741b9..3e4af06 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -1319,7 +1319,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
 		if (sk->sk_type != SOCK_STREAM)
 			return -ENOPROTOOPT;
 
-		msg.msg_control = optval;
+		msg.msg_control = (__force void*) optval;
 		msg.msg_controllen = len;
 		msg.msg_flags = flags;
 
-- 
1.9.1

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

end of thread, other threads:[~2014-07-21 21:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-20 11:30 [PATCH] clean up sparse cast warning in do_ip_getsockopt Karoly Kemeny
2014-07-21  5:22 ` David Miller
2014-07-21  8:54   ` David Laight
2014-07-21 21:31     ` 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).