]> err.no Git - linux-2.6/commitdiff
[SCTP]: Cleanups
authorAdrian Bunk <bunk@stusta.de>
Mon, 18 Sep 2006 07:40:38 +0000 (00:40 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 22:19:03 +0000 (15:19 -0700)
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>
include/net/sctp/sctp.h
net/sctp/ipv6.c
net/sctp/protocol.c
net/sctp/socket.c

index e274fd479990b84ec4b607c27a0160a655f7ce0f..ee68a3124076554d08d3dcc45cf96fc801834253 100644 (file)
@@ -128,6 +128,8 @@ extern int sctp_copy_local_addr_list(struct sctp_bind_addr *,
                                     int flags);
 extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family);
 extern int sctp_register_pf(struct sctp_pf *, sa_family_t);
+int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
+                        void *ptr);
 
 /*
  * sctp/socket.c
@@ -177,6 +179,17 @@ void sctp_icmp_proto_unreachable(struct sock *sk,
 void sctp_backlog_migrate(struct sctp_association *assoc,
                          struct sock *oldsk, struct sock *newsk);
 
+/*
+ * sctp/proc.c
+ */
+int sctp_snmp_proc_init(void);
+void sctp_snmp_proc_exit(void);
+int sctp_eps_proc_init(void);
+void sctp_eps_proc_exit(void);
+int sctp_assocs_proc_init(void);
+void sctp_assocs_proc_exit(void);
+
+
 /*
  *  Section:  Macros, externs, and inlines
  */
index 99c0cefc04e072ff49b1b794777d7cb904a6cd95..fd87e3ceb56e6d03289d195ab821e7fe34f6bc02 100644 (file)
@@ -78,7 +78,6 @@
 
 #include <asm/uaccess.h>
 
-extern int sctp_inetaddr_event(struct notifier_block *, unsigned long, void *);
 static struct notifier_block sctp_inet6addr_notifier = {
        .notifier_call = sctp_inetaddr_event,
 };
index d9dd4c47bc293d469521ec9b9430bdc579024a2e..fac7674438a4c00b3e28e8a33b0565e6a0d74637 100644 (file)
@@ -82,13 +82,6 @@ static struct sctp_af *sctp_af_v6_specific;
 kmem_cache_t *sctp_chunk_cachep __read_mostly;
 kmem_cache_t *sctp_bucket_cachep __read_mostly;
 
-extern int sctp_snmp_proc_init(void);
-extern int sctp_snmp_proc_exit(void);
-extern int sctp_eps_proc_init(void);
-extern int sctp_eps_proc_exit(void);
-extern int sctp_assocs_proc_init(void);
-extern int sctp_assocs_proc_exit(void);
-
 /* Return the address of the control sock. */
 struct sock *sctp_get_ctl_sock(void)
 {
index 7c1dbb1d10df9f478b8850aa87e62de01d72326c..79c3e072cf282027f3988c17d90bbc2c6c2143b8 100644 (file)
@@ -2081,13 +2081,13 @@ static int sctp_setsockopt_autoclose(struct sock *sk, char __user *optval,
  *                     SPP_SACKDELAY_ENABLE, setting both will have undefined
  *                     results.
  */
-int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
-                               struct sctp_transport   *trans,
-                               struct sctp_association *asoc,
-                               struct sctp_sock        *sp,
-                               int                      hb_change,
-                               int                      pmtud_change,
-                               int                      sackdelay_change)
+static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
+                                      struct sctp_transport   *trans,
+                                      struct sctp_association *asoc,
+                                      struct sctp_sock        *sp,
+                                      int                      hb_change,
+                                      int                      pmtud_change,
+                                      int                      sackdelay_change)
 {
        int error;