netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ipv6: ip6_route_output does not modify sk parameter, so make it const
@ 2011-03-22 22:01 Florian Westphal
  2011-03-23  2:17 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2011-03-22 22:01 UTC (permalink / raw)
  To: netdev; +Cc: Florian Westphal

This avoids explicit cast to avoid 'discards qualifiers'
compiler warning in a netfilter patch that i've been working on.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 include/net/ip6_route.h |    2 +-
 net/ipv6/route.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 642a80b..c850e5f 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -70,7 +70,7 @@ static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt)
 extern void			ip6_route_input(struct sk_buff *skb);
 
 extern struct dst_entry *	ip6_route_output(struct net *net,
-						 struct sock *sk,
+						 const struct sock *sk,
 						 struct flowi6 *fl6);
 
 extern int			ip6_route_init(void);
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 6814c87..843406f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -854,7 +854,7 @@ static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table
 	return ip6_pol_route(net, table, fl6->flowi6_oif, fl6, flags);
 }
 
-struct dst_entry * ip6_route_output(struct net *net, struct sock *sk,
+struct dst_entry * ip6_route_output(struct net *net, const struct sock *sk,
 				    struct flowi6 *fl6)
 {
 	int flags = 0;
-- 
1.7.3.4


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

* Re: [PATCH 1/1] ipv6: ip6_route_output does not modify sk parameter, so make it const
  2011-03-22 22:01 [PATCH 1/1] ipv6: ip6_route_output does not modify sk parameter, so make it const Florian Westphal
@ 2011-03-23  2:17 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-03-23  2:17 UTC (permalink / raw)
  To: fw; +Cc: netdev

From: Florian Westphal <fw@strlen.de>
Date: Tue, 22 Mar 2011 23:01:32 +0100

> This avoids explicit cast to avoid 'discards qualifiers'
> compiler warning in a netfilter patch that i've been working on.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>

Applied, thanks a lot Florian.

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

end of thread, other threads:[~2011-03-23  2:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 22:01 [PATCH 1/1] ipv6: ip6_route_output does not modify sk parameter, so make it const Florian Westphal
2011-03-23  2:17 ` 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).