Commit 161643660129dd7d98f0b12418c0a2710ffa7db6

Authored by Adrian Bunk
Committed by David S. Miller
1 parent 7198f8cec1

[SCTP]: Cleanups

This patch contains the following cleanups:
- make the following needlessly global function static:
  - socket.c: sctp_apply_peer_addr_params()
- add proper prototypes for the several global functions in
  include/net/sctp/sctp.h

Note that this fixes wrong prototypes for the following functions:
- sctp_snmp_proc_exit()
- sctp_eps_proc_exit()
- sctp_assocs_proc_exit()

The latter was spotted by the GNU C compiler and reported
by David Woodhouse.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 4 changed files with 20 additions and 15 deletions Side-by-side Diff

include/net/sctp/sctp.h
... ... @@ -128,6 +128,8 @@
128 128 int flags);
129 129 extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family);
130 130 extern int sctp_register_pf(struct sctp_pf *, sa_family_t);
  131 +int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
  132 + void *ptr);
131 133  
132 134 /*
133 135 * sctp/socket.c
... ... @@ -176,6 +178,17 @@
176 178 struct sctp_transport *t);
177 179 void sctp_backlog_migrate(struct sctp_association *assoc,
178 180 struct sock *oldsk, struct sock *newsk);
  181 +
  182 +/*
  183 + * sctp/proc.c
  184 + */
  185 +int sctp_snmp_proc_init(void);
  186 +void sctp_snmp_proc_exit(void);
  187 +int sctp_eps_proc_init(void);
  188 +void sctp_eps_proc_exit(void);
  189 +int sctp_assocs_proc_init(void);
  190 +void sctp_assocs_proc_exit(void);
  191 +
179 192  
180 193 /*
181 194 * Section: Macros, externs, and inlines
... ... @@ -78,7 +78,6 @@
78 78  
79 79 #include <asm/uaccess.h>
80 80  
81   -extern int sctp_inetaddr_event(struct notifier_block *, unsigned long, void *);
82 81 static struct notifier_block sctp_inet6addr_notifier = {
83 82 .notifier_call = sctp_inetaddr_event,
84 83 };
... ... @@ -82,13 +82,6 @@
82 82 kmem_cache_t *sctp_chunk_cachep __read_mostly;
83 83 kmem_cache_t *sctp_bucket_cachep __read_mostly;
84 84  
85   -extern int sctp_snmp_proc_init(void);
86   -extern int sctp_snmp_proc_exit(void);
87   -extern int sctp_eps_proc_init(void);
88   -extern int sctp_eps_proc_exit(void);
89   -extern int sctp_assocs_proc_init(void);
90   -extern int sctp_assocs_proc_exit(void);
91   -
92 85 /* Return the address of the control sock. */
93 86 struct sock *sctp_get_ctl_sock(void)
94 87 {
... ... @@ -2081,13 +2081,13 @@
2081 2081 * SPP_SACKDELAY_ENABLE, setting both will have undefined
2082 2082 * results.
2083 2083 */
2084   -int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
2085   - struct sctp_transport *trans,
2086   - struct sctp_association *asoc,
2087   - struct sctp_sock *sp,
2088   - int hb_change,
2089   - int pmtud_change,
2090   - int sackdelay_change)
  2084 +static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
  2085 + struct sctp_transport *trans,
  2086 + struct sctp_association *asoc,
  2087 + struct sctp_sock *sp,
  2088 + int hb_change,
  2089 + int pmtud_change,
  2090 + int sackdelay_change)
2091 2091 {
2092 2092 int error;
2093 2093