* [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
* Re: [PATCH] clean up sparse cast warning in do_ip_getsockopt
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
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2014-07-21 5:22 UTC (permalink / raw)
To: karoly.kemeny; +Cc: jmorris, netdev
From: Karoly Kemeny <karoly.kemeny@gmail.com>
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 <karoly.kemeny@gmail.com>
Please format your subject line correctly, it should be of the form:
[PATCH] ${SUBSYSTEM}: Description.
Your's is missing the subsystem prefix, which in this case should
be "ipv4: "
> - msg.msg_control = optval;
> + msg.msg_control = (__force void*) optval;
Please put a space between "void" and "*" in the cast.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] clean up sparse cast warning in do_ip_getsockopt
2014-07-21 5:22 ` David Miller
@ 2014-07-21 8:54 ` David Laight
2014-07-21 21:31 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: David Laight @ 2014-07-21 8:54 UTC (permalink / raw)
To: 'David Miller', karoly.kemeny; +Cc: jmorris, netdev
From: David Miller
> From: Karoly Kemeny <karoly.kemeny@gmail.com>
> 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 <karoly.kemeny@gmail.com>
>
> Please format your subject line correctly, it should be of the form:
>
> [PATCH] ${SUBSYSTEM}: Description.
>
> Your's is missing the subsystem prefix, which in this case should
> be "ipv4: "
>
> > - msg.msg_control = optval;
> > + msg.msg_control = (__force void*) optval;
>
> Please put a space between "void" and "*" in the cast.
And remove the one after the ')' ?
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clean up sparse cast warning in do_ip_getsockopt
2014-07-21 8:54 ` David Laight
@ 2014-07-21 21:31 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-07-21 21:31 UTC (permalink / raw)
To: David.Laight; +Cc: karoly.kemeny, jmorris, netdev
From: David Laight <David.Laight@ACULAB.COM>
Date: Mon, 21 Jul 2014 08:54:02 +0000
> From: David Miller
>> From: Karoly Kemeny <karoly.kemeny@gmail.com>
>> 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 <karoly.kemeny@gmail.com>
>>
>> Please format your subject line correctly, it should be of the form:
>>
>> [PATCH] ${SUBSYSTEM}: Description.
>>
>> Your's is missing the subsystem prefix, which in this case should
>> be "ipv4: "
>>
>> > - msg.msg_control = optval;
>> > + msg.msg_control = (__force void*) optval;
>>
>> Please put a space between "void" and "*" in the cast.
>
> And remove the one after the ')' ?
Not necessarily, I don't like when the closing parens and the variable
"touch".
^ permalink raw reply [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).