All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karoly Kemeny <karoly.kemeny@gmail.com>
To: jmorris@namei.org, netdev@vger.kernel.org, davem@davemloft.net
Subject: [PATCH] clean up sparse cast warning in do_ip_getsockopt
Date: Sun, 20 Jul 2014 13:30:17 +0200	[thread overview]
Message-ID: <20140720113017.GA8878@gmail.com> (raw)

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

             reply	other threads:[~2014-07-20 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-20 11:30 Karoly Kemeny [this message]
2014-07-21  5:22 ` [PATCH] clean up sparse cast warning in do_ip_getsockopt David Miller
2014-07-21  8:54   ` David Laight
2014-07-21 21:31     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140720113017.GA8878@gmail.com \
    --to=karoly.kemeny@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.