From ad41e067668c77308438ddf9c5ec6909cd11a5f9 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Mon, 16 Mar 2015 15:17:05 -0700 Subject: [PATCH] net: ping: fix constness inconsistency in ipv6_chk_addr The ipv6_chk_addr declarations and implementations aren't consistent about the dev parameter's constness. 6bc19fb upstream resolved this in favor of const, so let's do the same here. This fixes the following warning: net/ipv6/ping.c: In function 'pingv6_init': net/ipv6/ping.c:87:27: warning: assignment from incompatible pointer type pingv6_ops.ipv6_chk_addr = ipv6_chk_addr; ^ Change-Id: Ibd9efd7d489e661f71ab641c981689bf92258b7c Signed-off-by: Greg Hackmann --- include/net/ping.h | 2 +- net/ipv6/ping.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/ping.h b/include/net/ping.h index 9242fa090d3d..2db4860e5848 100644 --- a/include/net/ping.h +++ b/include/net/ping.h @@ -38,7 +38,7 @@ struct pingv6_ops { void (*ipv6_icmp_error)(struct sock *sk, struct sk_buff *skb, int err, __be16 port, u32 info, u8 *payload); int (*ipv6_chk_addr)(struct net *net, const struct in6_addr *addr, - struct net_device *dev, int strict); + const struct net_device *dev, int strict); }; struct ping_table { diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index b5f23f48ca74..857201f4936f 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c @@ -73,7 +73,7 @@ int dummy_icmpv6_err_convert(u8 type, u8 code, int *err) void dummy_ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, u32 info, u8 *payload) {} int dummy_ipv6_chk_addr(struct net *net, const struct in6_addr *addr, - struct net_device *dev, int strict) + const struct net_device *dev, int strict) { return 0; } -- 2.34.1