net: ping: fix constness inconsistency in ipv6_chk_addr
authorGreg Hackmann <ghackmann@google.com>
Mon, 16 Mar 2015 22:17:05 +0000 (15:17 -0700)
committerGreg Hackmann <ghackmann@google.com>
Mon, 16 Mar 2015 22:23:53 +0000 (15:23 -0700)
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 <ghackmann@google.com>
include/net/ping.h
net/ipv6/ping.c

index 9242fa090d3dea62b402e49b68da1c10fd635c9d..2db4860e5848def0360395bfb1b2fd0c80b98a47 100644 (file)
@@ -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 {
index b5f23f48ca740584d7ee9af26487d4782c0257b8..857201f4936fa6435d66265ba772a397bb83300a 100644 (file)
@@ -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;
 }