* [PATCH] ipv4: fix route mark sparse warning
@ 2012-10-10 18:27 Stephen Hemminger
2012-10-11 2:55 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2012-10-10 18:27 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Sparse complains about RTA_MARK which is should be host order according
to include file and usage in iproute.
net/ipv4/route.c:2223:46: warning: incorrect type in argument 3 (different base types)
net/ipv4/route.c:2223:46: expected restricted __be32 [usertype] value
net/ipv4/route.c:2223:46: got unsigned int [unsigned] [usertype] flowic_mark
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/ipv4/route.c 2012-10-09 10:35:03.323140263 -0700
+++ b/net/ipv4/route.c 2012-10-10 10:59:08.774798362 -0700
@@ -2220,7 +2220,7 @@ static int rt_fill_info(struct net *net,
goto nla_put_failure;
if (fl4->flowi4_mark &&
- nla_put_be32(skb, RTA_MARK, fl4->flowi4_mark))
+ nla_put_u32(skb, RTA_MARK, fl4->flowi4_mark))
goto nla_put_failure;
error = rt->dst.error;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ipv4: fix route mark sparse warning
2012-10-10 18:27 [PATCH] ipv4: fix route mark sparse warning Stephen Hemminger
@ 2012-10-11 2:55 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-10-11 2:55 UTC (permalink / raw)
To: shemminger; +Cc: netdev
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 10 Oct 2012 11:27:25 -0700
> Sparse complains about RTA_MARK which is should be host order according
> to include file and usage in iproute.
>
> net/ipv4/route.c:2223:46: warning: incorrect type in argument 3 (different base types)
> net/ipv4/route.c:2223:46: expected restricted __be32 [usertype] value
> net/ipv4/route.c:2223:46: got unsigned int [unsigned] [usertype] flowic_mark
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-11 2:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10 18:27 [PATCH] ipv4: fix route mark sparse warning Stephen Hemminger
2012-10-11 2:55 ` 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).