Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[LLC]: Fix sparse warnings

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>

+19 -16
+11 -2
include/net/llc.h
··· 89 89 atomic_inc(&sap->refcnt); 90 90 } 91 91 92 + extern void llc_sap_close(struct llc_sap *sap); 93 + 92 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 96 if (atomic_dec_and_test(&sap->refcnt)) 97 97 llc_sap_close(sap); 98 98 } ··· 101 101 102 102 extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, 103 103 unsigned char *dmac, unsigned char dsap); 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); 104 107 105 108 extern int llc_station_init(void); 106 109 extern void llc_station_exit(void); ··· 118 115 #ifdef CONFIG_SYSCTL 119 116 extern int llc_sysctl_init(void); 120 117 extern void llc_sysctl_exit(void); 118 + 119 + extern int sysctl_llc2_ack_timeout; 120 + extern int sysctl_llc2_busy_timeout; 121 + extern int sysctl_llc2_p_timeout; 122 + extern int sysctl_llc2_rej_timeout; 123 + extern int sysctl_llc_station_ack_timeout; 121 124 #else 122 125 #define llc_sysctl_init() (0) 123 126 #define llc_sysctl_exit() do { } while(0)
+2 -1
include/net/llc_conn.h
··· 92 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 97 extern void llc_sk_free(struct sock *sk); 97 98 98 99 extern void llc_sk_reset(struct sock *sk);
+1 -4
net/llc/af_llc.c
··· 555 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 560 int rc; 561 561 ··· 1002 1002 .mmap = sock_no_mmap, 1003 1003 .sendpage = sock_no_sendpage, 1004 1004 }; 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 1005 1009 1006 static char llc_proc_err_msg[] __initdata = 1010 1007 KERN_CRIT "LLC: Unable to register the proc_fs entries\n";
+1 -1
net/llc/llc_c_ac.c
··· 1321 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 1326 llc_sk(sk)->vS = (llc_sk(sk)->vS + 1) % 128; 1327 1327 return 0;
+2 -1
net/llc/llc_conn.c
··· 819 819 * Allocates a LLC sock and initializes it. Returns the new LLC sock 820 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 825 struct sock *sk = sk_alloc(family, priority, prot, 1); 825 826
+1 -1
net/llc/llc_core.c
··· 69 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 74 struct llc_sap* sap; 75 75
+1 -6
net/llc/sysctl_net_llc.c
··· 8 8 #include <linux/mm.h> 9 9 #include <linux/init.h> 10 10 #include <linux/sysctl.h> 11 + #include <net/llc.h> 11 12 12 13 #ifndef CONFIG_SYSCTL 13 14 #error This file should not be compiled without CONFIG_SYSCTL defined 14 15 #endif 15 - 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 16 22 17 static struct ctl_table llc2_timeout_table[] = { 23 18 {