net/sctp/: cleanups
Subsystems (3)
PATCH 1/1 net/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.
---
include/net/sctp/sctp.h | 13 +++++++++++++ net/sctp/ipv6.c | 1 - net/sctp/protocol.c | 7 ------- net/sctp/socket.c | 14 +++++++------- 4 files changed, 20 insertions(+), 15 deletions(-)
include/net/sctp/sctp.h renamed from include/net/sctp/sctp.h.old +13 -0
@@ -128,6 +128,8 @@ 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
@@ -178,6 +180,17 @@ 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 */
net/sctp/socket.c renamed from net/sctp/socket.c.old +7 -7
@@ -2081,13 +2081,13 @@* 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;
net/sctp/ipv6.c renamed from net/sctp/ipv6.c.old +0 -1
@@ -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, };
net/sctp/protocol.c renamed from net/sctp/protocol.c.old +0 -7
@@ -82,13 +82,6 @@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 ) {
Quoted 11 lines · Adrian Bunk
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 ininclude/net/sctp/sctp.hNote that this fixes wrong prototypes for the following functions:
-sctp_snmp_proc_exit()
-sctp_eps_proc_exit()
-sctp_assocs_proc_exit()
Quoted 4 lines
The latter was spotted by the GNU C compiler and reported by David Woodhouse.
Signed-off-by Adrian Bunk <[email protected]>
Quoted 87 lines
---
include/net/sctp/sctp.h | 13 +++++++++++++ net/sctp/ipv6.c | 1 - net/sctp/protocol.c | 7 ------- net/sctp/socket.c | 14 +++++++------- 4 files changed, 20 insertions(+), 15 deletions(-)include/net/sctp/sctp.h renamed from include/net/sctp/sctp.h.old +13
-0@@ -128,6 +128,8 @@ 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 @@ -178,6 +180,17 @@ 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 */ net/sctp/socket.c renamed from net/sctp/socket.c.old +7
-7@@ -2081,13 +2081,13 @@* 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;net/sctp/ipv6.c renamed from net/sctp/ipv6.c.old +0
-1@@ -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, };net/sctp/protocol.c renamed from net/sctp/protocol.c.old +0
-7@@ -82,13 +82,6 @@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 ) {
From: Sridhar Samudrala <[email protected]>
Date: Tue, 05 Sep 2006 16:44:21 -0700
Quoted 12 lines · Adrian Bunk
Quoted 11 lines
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 ininclude/net/sctp/sctp.hNote that this fixes wrong prototypes for the following functions:
-sctp_snmp_proc_exit()
-sctp_eps_proc_exit()
-sctp_assocs_proc_exit()
Quoted 6 lines
Quoted 4 lines
The latter was spotted by the GNU C compiler and reported by David Woodhouse.
Signed-off-by Adrian Bunk <[email protected]>
Applied, thanks.