From 5b6f114c99c467032588183c299f9299476504dc Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 4 Apr 2014 13:23:54 +0100 Subject: [PATCH] net: ipv6: Add missing const to ipv6_chk_addr The net_device used by ipv6_chk_addr is const in some users so add a const here, fixing a warning following mainline commit 6bc19fb82d4c05 (Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net) from David S. Miller. Change-Id: Iebfae34fc9f10f958c41aad6ac4008d61668a870 Signed-off-by: Mark Brown Signed-off-by: Sherman Yin [Folded in additional const fix to the dummy function from Sherman Yin] Signed-off-by: John Stultz --- 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 858788da5a2f..e2cc17cd1cfd 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