Commit 20380731 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller

[NET]: Fix sparse warnings

Of this type, mostly:

CHECK   net/ipv6/netfilter.c
net/ipv6/netfilter.c:96:12: warning: symbol 'ipv6_netfilter_init' was not declared. Should it be static?
net/ipv6/netfilter.c:101:6: warning: symbol 'ipv6_netfilter_fini' was not declared. Should it be static?
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9deff7f2
...@@ -110,6 +110,8 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) ...@@ -110,6 +110,8 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
{ {
return (struct ethhdr *)skb->mac.raw; return (struct ethhdr *)skb->mac.raw;
} }
extern struct ctl_table ether_table[];
#endif #endif
#endif /* _LINUX_IF_ETHER_H */ #endif /* _LINUX_IF_ETHER_H */
...@@ -191,10 +191,12 @@ struct frad_local ...@@ -191,10 +191,12 @@ struct frad_local
int buffer; /* current buffer for S508 firmware */ int buffer; /* current buffer for S508 firmware */
}; };
extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */ #endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
#ifdef __KERNEL__
extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
#endif
#endif #endif
...@@ -43,12 +43,16 @@ struct trh_hdr { ...@@ -43,12 +43,16 @@ struct trh_hdr {
}; };
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/config.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb) static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb)
{ {
return (struct trh_hdr *)skb->mac.raw; return (struct trh_hdr *)skb->mac.raw;
} }
#ifdef CONFIG_SYSCTL
extern struct ctl_table tr_table[];
#endif
#endif #endif
/* This is an Token-Ring LLC structure */ /* This is an Token-Ring LLC structure */
......
...@@ -129,6 +129,9 @@ struct igmpv3_query { ...@@ -129,6 +129,9 @@ struct igmpv3_query {
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/in.h> #include <linux/in.h>
extern int sysctl_igmp_max_memberships;
extern int sysctl_igmp_max_msf;
struct ip_sf_socklist struct ip_sf_socklist
{ {
unsigned int sl_max; unsigned int sl_max;
......
...@@ -286,5 +286,12 @@ static struct proto_ops name##_ops = { \ ...@@ -286,5 +286,12 @@ static struct proto_ops name##_ops = { \
#define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \ #define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \
MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto)) MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto))
#ifdef CONFIG_SYSCTL
#include <linux/sysctl.h>
extern ctl_table net_table[];
extern int net_msg_cost;
extern int net_msg_burst;
#endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _LINUX_NET_H */ #endif /* _LINUX_NET_H */
...@@ -244,6 +244,7 @@ struct netdev_boot_setup { ...@@ -244,6 +244,7 @@ struct netdev_boot_setup {
}; };
#define NETDEV_BOOT_SETUP_MAX 8 #define NETDEV_BOOT_SETUP_MAX 8
extern int __init netdev_boot_setup(char *str);
/* /*
* The DEVICE structure. * The DEVICE structure.
...@@ -673,6 +674,7 @@ extern void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev); ...@@ -673,6 +674,7 @@ extern void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
extern void dev_init(void); extern void dev_init(void);
extern int netdev_nit; extern int netdev_nit;
extern int netdev_budget;
/* Called by rtnetlink.c:rtnl_unlock() */ /* Called by rtnetlink.c:rtnl_unlock() */
extern void netdev_run_todo(void); extern void netdev_run_todo(void);
...@@ -908,6 +910,14 @@ extern int skb_checksum_help(struct sk_buff *skb, int inward); ...@@ -908,6 +910,14 @@ extern int skb_checksum_help(struct sk_buff *skb, int inward);
extern void net_enable_timestamp(void); extern void net_enable_timestamp(void);
extern void net_disable_timestamp(void); extern void net_disable_timestamp(void);
#ifdef CONFIG_PROC_FS
extern void *dev_seq_start(struct seq_file *seq, loff_t *pos);
extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos);
extern void dev_seq_stop(struct seq_file *seq, void *v);
#endif
extern void linkwatch_run_queue(void);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _LINUX_DEV_H */ #endif /* _LINUX_DEV_H */
...@@ -71,7 +71,7 @@ enum nf_ip6_hook_priorities { ...@@ -71,7 +71,7 @@ enum nf_ip6_hook_priorities {
NF_IP6_PRI_LAST = INT_MAX, NF_IP6_PRI_LAST = INT_MAX,
}; };
int ipv6_netfilter_init(void); extern int ipv6_netfilter_init(void);
void ipv6_netfilter_fini(void); extern void ipv6_netfilter_fini(void);
#endif /*__LINUX_IP6_NETFILTER_H*/ #endif /*__LINUX_IP6_NETFILTER_H*/
...@@ -2727,7 +2727,8 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o ...@@ -2727,7 +2727,8 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o
return security_ops->socket_getpeersec(sock, optval, optlen, len); return security_ops->socket_getpeersec(sock, optval, optlen, len);
} }
static inline int security_sk_alloc(struct sock *sk, int family, int priority) static inline int security_sk_alloc(struct sock *sk, int family,
unsigned int __nocast priority)
{ {
return security_ops->sk_alloc_security(sk, family, priority); return security_ops->sk_alloc_security(sk, family, priority);
} }
...@@ -2844,7 +2845,8 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o ...@@ -2844,7 +2845,8 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o
return -ENOPROTOOPT; return -ENOPROTOOPT;
} }
static inline int security_sk_alloc(struct sock *sk, int family, int priority) static inline int security_sk_alloc(struct sock *sk, int family,
unsigned int __nocast priority)
{ {
return 0; return 0;
} }
......
...@@ -1203,6 +1203,8 @@ extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); ...@@ -1203,6 +1203,8 @@ extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
extern void skb_split(struct sk_buff *skb, extern void skb_split(struct sk_buff *skb,
struct sk_buff *skb1, const u32 len); struct sk_buff *skb1, const u32 len);
extern void skb_release_data(struct sk_buff *skb);
static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
int len, void *buffer) int len, void *buffer)
{ {
......
...@@ -26,6 +26,13 @@ struct __kernel_sockaddr_storage { ...@@ -26,6 +26,13 @@ struct __kernel_sockaddr_storage {
#include <linux/types.h> /* pid_t */ #include <linux/types.h> /* pid_t */
#include <linux/compiler.h> /* __user */ #include <linux/compiler.h> /* __user */
extern int sysctl_somaxconn;
extern void sock_init(void);
#ifdef CONFIG_PROC_FS
struct seq_file;
extern void socket_seq_show(struct seq_file *seq);
#endif
typedef unsigned short sa_family_t; typedef unsigned short sa_family_t;
/* /*
......
...@@ -45,6 +45,7 @@ struct prefix_info { ...@@ -45,6 +45,7 @@ struct prefix_info {
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/config.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <net/if_inet6.h> #include <net/if_inet6.h>
#include <net/ipv6.h> #include <net/ipv6.h>
...@@ -238,5 +239,10 @@ static inline int ipv6_addr_is_ll_all_routers(const struct in6_addr *addr) ...@@ -238,5 +239,10 @@ static inline int ipv6_addr_is_ll_all_routers(const struct in6_addr *addr)
addr->s6_addr32[3] == htonl(0x00000002)); addr->s6_addr32[3] == htonl(0x00000002));
} }
#ifdef CONFIG_PROC_FS
extern int if6_proc_init(void);
extern void if6_proc_exit(void);
#endif
#endif #endif
#endif #endif
#ifndef __LINUX_NET_AFUNIX_H #ifndef __LINUX_NET_AFUNIX_H
#define __LINUX_NET_AFUNIX_H #define __LINUX_NET_AFUNIX_H
#include <linux/config.h>
#include <linux/socket.h>
#include <linux/un.h>
#include <net/sock.h>
extern void unix_inflight(struct file *fp); extern void unix_inflight(struct file *fp);
extern void unix_notinflight(struct file *fp); extern void unix_notinflight(struct file *fp);
extern void unix_gc(void); extern void unix_gc(void);
...@@ -74,5 +80,14 @@ struct unix_sock { ...@@ -74,5 +80,14 @@ struct unix_sock {
wait_queue_head_t peer_wait; wait_queue_head_t peer_wait;
}; };
#define unix_sk(__sk) ((struct unix_sock *)__sk) #define unix_sk(__sk) ((struct unix_sock *)__sk)
#ifdef CONFIG_SYSCTL
extern int sysctl_unix_max_dgram_qlen;
extern void unix_sysctl_register(void);
extern void unix_sysctl_unregister(void);
#else
static inline void unix_sysctl_register(void) {}
static inline void unix_sysctl_unregister(void) {}
#endif
#endif #endif
#endif #endif
...@@ -57,4 +57,11 @@ static inline struct raw_sock *raw_sk(const struct sock *sk) ...@@ -57,4 +57,11 @@ static inline struct raw_sock *raw_sk(const struct sock *sk)
return (struct raw_sock *)sk; return (struct raw_sock *)sk;
} }
extern int sysctl_icmp_echo_ignore_all;
extern int sysctl_icmp_echo_ignore_broadcasts;
extern int sysctl_icmp_ignore_bogus_error_responses;
extern int sysctl_icmp_errors_use_inbound_ifaddr;
extern int sysctl_icmp_ratelimit;
extern int sysctl_icmp_ratemask;
#endif /* _ICMP_H */ #endif /* _ICMP_H */
...@@ -163,6 +163,24 @@ extern int sysctl_local_port_range[2]; ...@@ -163,6 +163,24 @@ extern int sysctl_local_port_range[2];
extern int sysctl_ip_default_ttl; extern int sysctl_ip_default_ttl;
extern int sysctl_ip_nonlocal_bind; extern int sysctl_ip_nonlocal_bind;
/* From ip_fragment.c */
extern int sysctl_ipfrag_high_thresh;
extern int sysctl_ipfrag_low_thresh;
extern int sysctl_ipfrag_time;
extern int sysctl_ipfrag_secret_interval;
/* From inetpeer.c */
extern int inet_peer_threshold;
extern int inet_peer_minttl;
extern int inet_peer_maxttl;
extern int inet_peer_gc_mintime;
extern int inet_peer_gc_maxtime;
/* From ip_output.c */
extern int sysctl_ip_dynaddr;
extern void ipfrag_init(void);
#ifdef CONFIG_INET #ifdef CONFIG_INET
/* The function in 2.2 was invalid, producing wrong result for /* The function in 2.2 was invalid, producing wrong result for
* check=0xFEFF. It was noticed by Arthur Skawina _year_ ago. --ANK(000625) */ * check=0xFEFF. It was noticed by Arthur Skawina _year_ ago. --ANK(000625) */
...@@ -348,5 +366,10 @@ int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen, ...@@ -348,5 +366,10 @@ int ipv4_doint_and_flush_strategy(ctl_table *table, int __user *name, int nlen,
void __user *oldval, size_t __user *oldlenp, void __user *oldval, size_t __user *oldlenp,
void __user *newval, size_t newlen, void __user *newval, size_t newlen,
void **context); void **context);
#ifdef CONFIG_PROC_FS
extern int ip_misc_proc_init(void);
#endif
extern struct ctl_table ipv4_table[];
#endif /* _IP_H */ #endif /* _IP_H */
...@@ -295,4 +295,9 @@ static inline void fib_res_put(struct fib_result *res) ...@@ -295,4 +295,9 @@ static inline void fib_res_put(struct fib_result *res)
#endif #endif
} }
#ifdef CONFIG_PROC_FS
extern int fib_proc_init(void);
extern void fib_proc_exit(void);
#endif
#endif /* _NET_FIB_H */ #endif /* _NET_FIB_H */
...@@ -104,6 +104,7 @@ struct frag_hdr { ...@@ -104,6 +104,7 @@ struct frag_hdr {
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/config.h>
#include <net/sock.h> #include <net/sock.h>
/* sysctls */ /* sysctls */
...@@ -464,8 +465,38 @@ extern int sysctl_ip6frag_low_thresh; ...@@ -464,8 +465,38 @@ extern int sysctl_ip6frag_low_thresh;
extern int sysctl_ip6frag_time; extern int sysctl_ip6frag_time;
extern int sysctl_ip6frag_secret_interval; extern int sysctl_ip6frag_secret_interval;
#endif /* __KERNEL__ */ extern struct proto_ops inet6_stream_ops;
#endif /* _NET_IPV6_H */ extern struct proto_ops inet6_dgram_ops;
extern int ip6_mc_source(int add, int omode, struct sock *sk,
struct group_source_req *pgsr);
extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf);
extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
struct group_filter __user *optval,
int __user *optlen);
#ifdef CONFIG_PROC_FS
extern int ac6_proc_init(void);
extern void ac6_proc_exit(void);
extern int raw6_proc_init(void);
extern void raw6_proc_exit(void);
extern int tcp6_proc_init(void);
extern void tcp6_proc_exit(void);
extern int udp6_proc_init(void);
extern void udp6_proc_exit(void);
extern int ipv6_misc_proc_init(void);
extern void ipv6_misc_proc_exit(void);
extern struct rt6_statistics rt6_stats;
#endif
#ifdef CONFIG_SYSCTL
extern ctl_table ipv6_route_table[];
extern ctl_table ipv6_icmp_table[];
extern void ipv6_sysctl_register(void);
extern void ipv6_sysctl_unregister(void);
#endif
#endif /* __KERNEL__ */
#endif /* _NET_IPV6_H */
...@@ -8,4 +8,6 @@ extern struct datalink_proto * ...@@ -8,4 +8,6 @@ extern struct datalink_proto *
struct net_device *orig_dev)); struct net_device *orig_dev));
extern void unregister_8022_client(struct datalink_proto *proto); extern void unregister_8022_client(struct datalink_proto *proto);
extern struct datalink_proto *make_8023_client(void);
extern void destroy_8023_client(struct datalink_proto *dl);
#endif #endif
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
#ifndef _RAW_H #ifndef _RAW_H
#define _RAW_H #define _RAW_H
#include <linux/config.h>
extern struct proto raw_prot; extern struct proto raw_prot;
extern void raw_err(struct sock *, struct sk_buff *, u32 info); extern void raw_err(struct sock *, struct sk_buff *, u32 info);
extern int raw_rcv(struct sock *, struct sk_buff *); extern int raw_rcv(struct sock *, struct sk_buff *);
...@@ -39,4 +39,9 @@ extern struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num, ...@@ -39,4 +39,9 @@ extern struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num,
extern int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash); extern int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash);
#ifdef CONFIG_PROC_FS
extern int raw_proc_init(void);
extern void raw_proc_exit(void);
#endif
#endif /* _RAW_H */ #endif /* _RAW_H */
...@@ -195,4 +195,6 @@ static inline struct inet_peer *rt_get_peer(struct rtable *rt) ...@@ -195,4 +195,6 @@ static inline struct inet_peer *rt_get_peer(struct rtable *rt)
return rt->peer; return rt->peer;
} }
extern ctl_table ipv4_route_table[];
#endif /* _ROUTE_H */ #endif /* _ROUTE_H */
...@@ -1370,4 +1370,16 @@ static inline int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsign ...@@ -1370,4 +1370,16 @@ static inline int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsign
} }
#endif #endif
extern void sk_init(void);
#ifdef CONFIG_SYSCTL
extern struct ctl_table core_table[];
extern int sysctl_optmem_max;
#endif
#ifdef CONFIG_PROC_FS
extern __u32 sysctl_wmem_default;
extern __u32 sysctl_rmem_default;
#endif
#endif /* _SOCK_H */ #endif /* _SOCK_H */
...@@ -1183,4 +1183,16 @@ struct tcp_iter_state { ...@@ -1183,4 +1183,16 @@ struct tcp_iter_state {
extern int tcp_proc_register(struct tcp_seq_afinfo *afinfo); extern int tcp_proc_register(struct tcp_seq_afinfo *afinfo);
extern void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo); extern void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo);
extern struct request_sock_ops tcp_request_sock_ops;
extern int tcp_v4_destroy_sock(struct sock *sk);
#ifdef CONFIG_PROC_FS
extern int tcp4_proc_init(void);
extern void tcp4_proc_exit(void);
#endif
extern void tcp_v4_init(struct net_proto_family *ops);
extern void tcp_init(void);
#endif /* _TCP_H */ #endif /* _TCP_H */
...@@ -94,6 +94,11 @@ struct udp_iter_state { ...@@ -94,6 +94,11 @@ struct udp_iter_state {
struct seq_operations seq_ops; struct seq_operations seq_ops;
}; };
#ifdef CONFIG_PROC_FS
extern int udp_proc_register(struct udp_seq_afinfo *afinfo); extern int udp_proc_register(struct udp_seq_afinfo *afinfo);
extern void udp_proc_unregister(struct udp_seq_afinfo *afinfo); extern void udp_proc_unregister(struct udp_seq_afinfo *afinfo);
extern int udp4_proc_init(void);
extern void udp4_proc_exit(void);
#endif
#endif /* _UDP_H */ #endif /* _UDP_H */
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <linux/rmap.h> #include <linux/rmap.h>
#include <linux/mempolicy.h> #include <linux/mempolicy.h>
#include <linux/key.h> #include <linux/key.h>
#include <net/sock.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/bugs.h> #include <asm/bugs.h>
...@@ -80,7 +81,6 @@ ...@@ -80,7 +81,6 @@
static int init(void *); static int init(void *);
extern void init_IRQ(void); extern void init_IRQ(void);
extern void sock_init(void);
extern void fork_init(unsigned long); extern void fork_init(unsigned long);
extern void mca_init(void); extern void mca_init(void);
extern void sbus_init(void); extern void sbus_init(void);
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/net.h>
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <linux/highuid.h> #include <linux/highuid.h>
#include <linux/writeback.h> #include <linux/writeback.h>
...@@ -136,9 +137,6 @@ static struct ctl_table_header root_table_header = ...@@ -136,9 +137,6 @@ static struct ctl_table_header root_table_header =
static ctl_table kern_table[]; static ctl_table kern_table[];
static ctl_table vm_table[]; static ctl_table vm_table[];
#ifdef CONFIG_NET
extern ctl_table net_table[];
#endif
static ctl_table proc_table[]; static ctl_table proc_table[];
static ctl_table fs_table[]; static ctl_table fs_table[];
static ctl_table debug_table[]; static ctl_table debug_table[];
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <net/datalink.h> #include <net/datalink.h>
#include <net/p8022.h>
/* /*
* Place an 802.3 header on a packet. The driver will do the mac * Place an 802.3 header on a packet. The driver will do the mac
......
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#include <linux/config.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/if_tr.h>
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/config.h>
#ifdef CONFIG_TR