diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-22 04:14:33 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-22 04:14:33 -0400 |
commit | 2928c19e1086e2f1e90d05931437ab6f1e4cfdc8 (patch) | |
tree | 47bd56109e8d6b0792735c01108a4df685539459 | |
parent | 0519d8fbabc4eb215a8263f29143ccd86c328157 (diff) |
[LLC]: Fix sparse warnings
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
-rw-r--r-- | include/net/llc.h | 13 | ||||
-rw-r--r-- | include/net/llc_conn.h | 3 | ||||
-rw-r--r-- | net/llc/af_llc.c | 5 | ||||
-rw-r--r-- | net/llc/llc_c_ac.c | 2 | ||||
-rw-r--r-- | net/llc/llc_conn.c | 3 | ||||
-rw-r--r-- | net/llc/llc_core.c | 2 | ||||
-rw-r--r-- | net/llc/sysctl_net_llc.c | 7 |
7 files changed, 19 insertions, 16 deletions
diff --git a/include/net/llc.h b/include/net/llc.h index 93e5b443a9a7..1adb2ef3f6f7 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
@@ -89,10 +89,10 @@ static inline void llc_sap_hold(struct llc_sap *sap) | |||
89 | atomic_inc(&sap->refcnt); | 89 | atomic_inc(&sap->refcnt); |
90 | } | 90 | } |
91 | 91 | ||
92 | extern void llc_sap_close(struct llc_sap *sap); | ||
93 | |||
92 | static inline void llc_sap_put(struct llc_sap *sap) | 94 | static inline void llc_sap_put(struct llc_sap *sap) |
93 | { | 95 | { |
94 | extern void llc_sap_close(struct llc_sap *sap); | ||
95 | |||
96 | if (atomic_dec_and_test(&sap->refcnt)) | 96 | if (atomic_dec_and_test(&sap->refcnt)) |
97 | llc_sap_close(sap); | 97 | llc_sap_close(sap); |
98 | } | 98 | } |
@@ -102,6 +102,9 @@ extern struct llc_sap *llc_sap_find(unsigned char sap_value); | |||
102 | extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, | 102 | extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, |
103 | unsigned char *dmac, unsigned char dsap); | 103 | unsigned char *dmac, unsigned char dsap); |
104 | 104 | ||
105 | extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb); | ||
106 | extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb); | ||
107 | |||
105 | extern int llc_station_init(void); | 108 | extern int llc_station_init(void); |
106 | extern void llc_station_exit(void); | 109 | extern void llc_station_exit(void); |
107 | 110 | ||
@@ -115,6 +118,12 @@ extern void llc_proc_exit(void); | |||
115 | #ifdef CONFIG_SYSCTL | 118 | #ifdef CONFIG_SYSCTL |
116 | extern int llc_sysctl_init(void); | 119 | extern int llc_sysctl_init(void); |
117 | extern void llc_sysctl_exit(void); | 120 | extern void llc_sysctl_exit(void); |
121 | |||
122 | extern int sysctl_llc2_ack_timeout; | ||
123 | extern int sysctl_llc2_busy_timeout; | ||
124 | extern int sysctl_llc2_p_timeout; | ||
125 | extern int sysctl_llc2_rej_timeout; | ||
126 | extern int sysctl_llc_station_ack_timeout; | ||
118 | #else | 127 | #else |
119 | #define llc_sysctl_init() (0) | 128 | #define llc_sysctl_init() (0) |
120 | #define llc_sysctl_exit() do { } while(0) | 129 | #define llc_sysctl_exit() do { } while(0) |
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h index b2889218c76a..e44f494bbef1 100644 --- a/include/net/llc_conn.h +++ b/include/net/llc_conn.h | |||
@@ -92,7 +92,8 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb) | |||
92 | return skb->cb[sizeof(skb->cb) - 1]; | 92 | return skb->cb[sizeof(skb->cb) - 1]; |
93 | } | 93 | } |
94 | 94 | ||
95 | extern struct sock *llc_sk_alloc(int family, int priority, struct proto *prot); | 95 | extern struct sock *llc_sk_alloc(int family, unsigned int __nocast priority, |
96 | struct proto *prot); | ||
96 | extern void llc_sk_free(struct sock *sk); | 97 | extern void llc_sk_free(struct sock *sk); |
97 | 98 | ||
98 | extern void llc_sk_reset(struct sock *sk); | 99 | extern void llc_sk_reset(struct sock *sk); |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 3361ae900e2b..7aa51eb79b13 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -555,7 +555,7 @@ static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout) | |||
555 | return rc; | 555 | return rc; |
556 | } | 556 | } |
557 | 557 | ||
558 | int llc_wait_data(struct sock *sk, long timeo) | 558 | static int llc_wait_data(struct sock *sk, long timeo) |
559 | { | 559 | { |
560 | int rc; | 560 | int rc; |
561 | 561 | ||
@@ -1003,9 +1003,6 @@ static struct proto_ops llc_ui_ops = { | |||
1003 | .sendpage = sock_no_sendpage, | 1003 | .sendpage = sock_no_sendpage, |
1004 | }; | 1004 | }; |
1005 | 1005 | ||
1006 | extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb); | ||
1007 | extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb); | ||
1008 | |||
1009 | static char llc_proc_err_msg[] __initdata = | 1006 | static char llc_proc_err_msg[] __initdata = |
1010 | KERN_CRIT "LLC: Unable to register the proc_fs entries\n"; | 1007 | KERN_CRIT "LLC: Unable to register the proc_fs entries\n"; |
1011 | static char llc_sysctl_err_msg[] __initdata = | 1008 | static char llc_sysctl_err_msg[] __initdata = |
diff --git a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c index 05236c2cbb9e..8f7b46d20638 100644 --- a/net/llc/llc_c_ac.c +++ b/net/llc/llc_c_ac.c | |||
@@ -1321,7 +1321,7 @@ int llc_conn_ac_set_vs_nr(struct sock *sk, struct sk_buff *skb) | |||
1321 | return 0; | 1321 | return 0; |
1322 | } | 1322 | } |
1323 | 1323 | ||
1324 | int llc_conn_ac_inc_vs_by_1(struct sock *sk, struct sk_buff *skb) | 1324 | static int llc_conn_ac_inc_vs_by_1(struct sock *sk, struct sk_buff *skb) |
1325 | { | 1325 | { |
1326 | llc_sk(sk)->vS = (llc_sk(sk)->vS + 1) % 128; | 1326 | llc_sk(sk)->vS = (llc_sk(sk)->vS + 1) % 128; |
1327 | return 0; | 1327 | return 0; |
diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c index ab9e6d7e2875..76f94e0d840d 100644 --- a/net/llc/llc_conn.c +++ b/net/llc/llc_conn.c | |||
@@ -819,7 +819,8 @@ static void llc_sk_init(struct sock* sk) | |||
819 | * Allocates a LLC sock and initializes it. Returns the new LLC sock | 819 | * Allocates a LLC sock and initializes it. Returns the new LLC sock |
820 | * or %NULL if there's no memory available for one | 820 | * or %NULL if there's no memory available for one |
821 | */ | 821 | */ |
822 | struct sock *llc_sk_alloc(int family, int priority, struct proto *prot) | 822 | struct sock *llc_sk_alloc(int family, unsigned int __nocast priority, |
823 | struct proto *prot) | ||
823 | { | 824 | { |
824 | struct sock *sk = sk_alloc(family, priority, prot, 1); | 825 | struct sock *sk = sk_alloc(family, priority, prot, 1); |
825 | 826 | ||
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c index 9ccff1266b26..ab0fcd32fd84 100644 --- a/net/llc/llc_core.c +++ b/net/llc/llc_core.c | |||
@@ -69,7 +69,7 @@ static void llc_del_sap(struct llc_sap *sap) | |||
69 | write_unlock_bh(&llc_sap_list_lock); | 69 | write_unlock_bh(&llc_sap_list_lock); |
70 | } | 70 | } |
71 | 71 | ||
72 | struct llc_sap *__llc_sap_find(unsigned char sap_value) | 72 | static struct llc_sap *__llc_sap_find(unsigned char sap_value) |
73 | { | 73 | { |
74 | struct llc_sap* sap; | 74 | struct llc_sap* sap; |
75 | 75 | ||
diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c index 4d99d2f27a21..d1eaddb13633 100644 --- a/net/llc/sysctl_net_llc.c +++ b/net/llc/sysctl_net_llc.c | |||
@@ -8,17 +8,12 @@ | |||
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/sysctl.h> | 10 | #include <linux/sysctl.h> |
11 | #include <net/llc.h> | ||
11 | 12 | ||
12 | #ifndef CONFIG_SYSCTL | 13 | #ifndef CONFIG_SYSCTL |
13 | #error This file should not be compiled without CONFIG_SYSCTL defined | 14 | #error This file should not be compiled without CONFIG_SYSCTL defined |
14 | #endif | 15 | #endif |
15 | 16 | ||
16 | extern int sysctl_llc2_ack_timeout; | ||
17 | extern int sysctl_llc2_busy_timeout; | ||
18 | extern int sysctl_llc2_p_timeout; | ||
19 | extern int sysctl_llc2_rej_timeout; | ||
20 | extern int sysctl_llc_station_ack_timeout; | ||
21 | |||
22 | static struct ctl_table llc2_timeout_table[] = { | 17 | static struct ctl_table llc2_timeout_table[] = { |
23 | { | 18 | { |
24 | .ctl_name = NET_LLC2_ACK_TIMEOUT, | 19 | .ctl_name = NET_LLC2_ACK_TIMEOUT, |