Subject: [PATCH] clean up sparse cast warning in do_ip_getsockopt

From: Karoly Kemeny <[email-masked]>
Date: Sun, 20 Jul 2014 13:30:17 +0200

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

Signed-off-by: Karoly Kemeny <[email-masked]>
---
 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