Commit 7e3ea6d5c4f4880dbdf85f4083f40d8a3dc9b906
Committed by
David S. Miller
1 parent
0144a81ccc
sctp: avoid to repeatedly declare external variables
Move the declaration for external variables to sctp.h file avoiding to repeatedly declare them with extern keyword. Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 3 changed files with 3 additions and 9 deletions Side-by-side Diff
include/net/sctp/sctp.h
... | ... | @@ -166,6 +166,9 @@ |
166 | 166 | */ |
167 | 167 | extern struct kmem_cache *sctp_chunk_cachep __read_mostly; |
168 | 168 | extern struct kmem_cache *sctp_bucket_cachep __read_mostly; |
169 | +extern long sysctl_sctp_mem[3]; | |
170 | +extern int sysctl_sctp_rmem[3]; | |
171 | +extern int sysctl_sctp_wmem[3]; | |
169 | 172 | |
170 | 173 | /* |
171 | 174 | * Section: Macros, externs, and inlines |
net/sctp/socket.c
... | ... | @@ -102,11 +102,6 @@ |
102 | 102 | static void sctp_sock_migrate(struct sock *, struct sock *, |
103 | 103 | struct sctp_association *, sctp_socket_type_t); |
104 | 104 | |
105 | -extern struct kmem_cache *sctp_bucket_cachep; | |
106 | -extern long sysctl_sctp_mem[3]; | |
107 | -extern int sysctl_sctp_rmem[3]; | |
108 | -extern int sysctl_sctp_wmem[3]; | |
109 | - | |
110 | 105 | static int sctp_memory_pressure; |
111 | 106 | static atomic_long_t sctp_memory_allocated; |
112 | 107 | struct percpu_counter sctp_sockets_allocated; |
net/sctp/sysctl.c
... | ... | @@ -58,10 +58,6 @@ |
58 | 58 | (MAX_SCHEDULE_TIMEOUT / HZ > UINT_MAX) |
59 | 59 | ? UINT_MAX : MAX_SCHEDULE_TIMEOUT / HZ; |
60 | 60 | |
61 | -extern long sysctl_sctp_mem[3]; | |
62 | -extern int sysctl_sctp_rmem[3]; | |
63 | -extern int sysctl_sctp_wmem[3]; | |
64 | - | |
65 | 61 | static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write, |
66 | 62 | void __user *buffer, size_t *lenp, |
67 | 63 | loff_t *ppos); |