diff mbox series

[net] ipv6: ndisc: adjust ndisc_ifinfo_sysctl_change prototype

Message ID 20200824114622.26400-1-tklauser@distanz.ch
State Accepted
Delegated to: David Miller
Headers show
Series [net] ipv6: ndisc: adjust ndisc_ifinfo_sysctl_change prototype | expand

Commit Message

Tobias Klauser Aug. 24, 2020, 11:46 a.m. UTC
Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
changed ndisc_ifinfo_sysctl_change to take a kernel pointer. Adjust its
prototype in net/ndisc.h as well to fix the following sparse warning:

net/ipv6/ndisc.c:1838:5: error: symbol 'ndisc_ifinfo_sysctl_change' redeclared with different type (incompatible argument 3 (different address spaces)):
net/ipv6/ndisc.c:1838:5:    int extern [addressable] [signed] [toplevel] ndisc_ifinfo_sysctl_change( ... )
net/ipv6/ndisc.c: note: in included file (through include/net/ipv6.h):
./include/net/ndisc.h:496:5: note: previously declared as:
./include/net/ndisc.h:496:5:    int extern [addressable] [signed] [toplevel] ndisc_ifinfo_sysctl_change( ... )
net/ipv6/ndisc.c: note: in included file (through include/net/ip6_route.h):

Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 include/net/ndisc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Aug. 24, 2020, 1:40 p.m. UTC | #1
From: Tobias Klauser <tklauser@distanz.ch>
Date: Mon, 24 Aug 2020 13:46:22 +0200

> Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
> changed ndisc_ifinfo_sysctl_change to take a kernel pointer. Adjust its
> prototype in net/ndisc.h as well to fix the following sparse warning:
> 
> net/ipv6/ndisc.c:1838:5: error: symbol 'ndisc_ifinfo_sysctl_change' redeclared with different type (incompatible argument 3 (different address spaces)):
> net/ipv6/ndisc.c:1838:5:    int extern [addressable] [signed] [toplevel] ndisc_ifinfo_sysctl_change( ... )
> net/ipv6/ndisc.c: note: in included file (through include/net/ipv6.h):
> ./include/net/ndisc.h:496:5: note: previously declared as:
> ./include/net/ndisc.h:496:5:    int extern [addressable] [signed] [toplevel] ndisc_ifinfo_sysctl_change( ... )
> net/ipv6/ndisc.c: note: in included file (through include/net/ip6_route.h):
> 
> Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
> Cc: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Applied, thank you.
diff mbox series

Patch

diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 9205a76d967a..38e4094960ce 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -494,7 +494,7 @@  int igmp6_event_report(struct sk_buff *skb);
 
 #ifdef CONFIG_SYSCTL
 int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write,
-			       void __user *buffer, size_t *lenp, loff_t *ppos);
+			       void *buffer, size_t *lenp, loff_t *ppos);
 int ndisc_ifinfo_sysctl_strategy(struct ctl_table *ctl,
 				 void __user *oldval, size_t __user *oldlenp,
 				 void __user *newval, size_t newlen);