From: Florian Westphal Date: Wed, 23 Mar 2011 02:17:36 +0000 (-0700) Subject: ipv6: ip6_route_output does not modify sk parameter, so make it const X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9c7a4f9ce651383c73dfdff3d7e21d5f9572c4ec;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ipv6: ip6_route_output does not modify sk parameter, so make it const 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 Signed-off-by: David S. Miller --- diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 642a80bb42cf..c850e5fb967c 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 6814c8722fa7..843406f14d7b 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;