Skip to content

Commit 2038073

Browse files
Arnaldo Carvalho de MeloDavid S. Miller
authored andcommitted
[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: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9deff7f commit 2038073

54 files changed

Lines changed: 208 additions & 162 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎include/linux/if_ether.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
110110
{
111111
return (struct ethhdr *)skb->mac.raw;
112112
}
113+
114+
extern struct ctl_table ether_table[];
113115
#endif
114116

115117
#endif /* _LINUX_IF_ETHER_H */

‎include/linux/if_frad.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,12 @@ struct frad_local
191191
int buffer; /* current buffer for S508 firmware */
192192
};
193193

194-
extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
195-
196194
#endif /* __KERNEL__ */
197195

198196
#endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */
199197

198+
#ifdef __KERNEL__
199+
extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
200+
#endif
201+
200202
#endif

‎include/linux/if_tr.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,16 @@ struct trh_hdr {
4343
};
4444

4545
#ifdef __KERNEL__
46+
#include <linux/config.h>
4647
#include <linux/skbuff.h>
4748

4849
static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb)
4950
{
5051
return (struct trh_hdr *)skb->mac.raw;
5152
}
53+
#ifdef CONFIG_SYSCTL
54+
extern struct ctl_table tr_table[];
55+
#endif
5256
#endif
5357

5458
/* This is an Token-Ring LLC structure */

‎include/linux/igmp.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ struct igmpv3_query {
129129
#include <linux/skbuff.h>
130130
#include <linux/in.h>
131131

132+
extern int sysctl_igmp_max_memberships;
133+
extern int sysctl_igmp_max_msf;
134+
132135
struct ip_sf_socklist
133136
{
134137
unsigned int sl_max;

‎include/linux/net.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,12 @@ static struct proto_ops name##_ops = { \
286286
#define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \
287287
MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto))
288288

289+
#ifdef CONFIG_SYSCTL
290+
#include <linux/sysctl.h>
291+
extern ctl_table net_table[];
292+
extern int net_msg_cost;
293+
extern int net_msg_burst;
294+
#endif
295+
289296
#endif /* __KERNEL__ */
290297
#endif /* _LINUX_NET_H */

‎include/linux/netdevice.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ struct netdev_boot_setup {
244244
};
245245
#define NETDEV_BOOT_SETUP_MAX 8
246246

247+
extern int __init netdev_boot_setup(char *str);
247248

248249
/*
249250
* The DEVICE structure.
@@ -673,6 +674,7 @@ extern void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
673674
extern void dev_init(void);
674675

675676
extern int netdev_nit;
677+
extern int netdev_budget;
676678

677679
/* Called by rtnetlink.c:rtnl_unlock() */
678680
extern void netdev_run_todo(void);
@@ -908,6 +910,14 @@ extern int skb_checksum_help(struct sk_buff *skb, int inward);
908910
extern void net_enable_timestamp(void);
909911
extern void net_disable_timestamp(void);
910912

913+
#ifdef CONFIG_PROC_FS
914+
extern void *dev_seq_start(struct seq_file *seq, loff_t *pos);
915+
extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos);
916+
extern void dev_seq_stop(struct seq_file *seq, void *v);
917+
#endif
918+
919+
extern void linkwatch_run_queue(void);
920+
911921
#endif /* __KERNEL__ */
912922

913923
#endif /* _LINUX_DEV_H */

‎include/linux/netfilter_ipv6.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ enum nf_ip6_hook_priorities {
7171
NF_IP6_PRI_LAST = INT_MAX,
7272
};
7373

74-
int ipv6_netfilter_init(void);
75-
void ipv6_netfilter_fini(void);
74+
extern int ipv6_netfilter_init(void);
75+
extern void ipv6_netfilter_fini(void);
7676

7777
#endif /*__LINUX_IP6_NETFILTER_H*/

‎include/linux/security.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,7 +2727,8 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o
27272727
return security_ops->socket_getpeersec(sock, optval, optlen, len);
27282728
}
27292729

2730-
static inline int security_sk_alloc(struct sock *sk, int family, int priority)
2730+
static inline int security_sk_alloc(struct sock *sk, int family,
2731+
unsigned int __nocast priority)
27312732
{
27322733
return security_ops->sk_alloc_security(sk, family, priority);
27332734
}
@@ -2844,7 +2845,8 @@ static inline int security_socket_getpeersec(struct socket *sock, char __user *o
28442845
return -ENOPROTOOPT;
28452846
}
28462847

2847-
static inline int security_sk_alloc(struct sock *sk, int family, int priority)
2848+
static inline int security_sk_alloc(struct sock *sk, int family,
2849+
unsigned int __nocast priority)
28482850
{
28492851
return 0;
28502852
}

‎include/linux/skbuff.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,8 @@ extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
12031203
extern void skb_split(struct sk_buff *skb,
12041204
struct sk_buff *skb1, const u32 len);
12051205

1206+
extern void skb_release_data(struct sk_buff *skb);
1207+
12061208
static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
12071209
int len, void *buffer)
12081210
{

‎include/linux/socket.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ struct __kernel_sockaddr_storage {
2626
#include <linux/types.h> /* pid_t */
2727
#include <linux/compiler.h> /* __user */
2828

29+
extern int sysctl_somaxconn;
30+
extern void sock_init(void);
31+
#ifdef CONFIG_PROC_FS
32+
struct seq_file;
33+
extern void socket_seq_show(struct seq_file *seq);
34+
#endif
35+
2936
typedef unsigned short sa_family_t;
3037

3138
/*

0 commit comments

Comments
 (0)