netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] net/sctp/: cleanups
@ 2006-09-05 21:57 Adrian Bunk
  2006-09-05 23:44 ` Sridhar Samudrala
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2006-09-05 21:57 UTC (permalink / raw)
  To: sri; +Cc: lksctp-developers, netdev, linux-kernel, David Woodhouse

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>

---

 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(-)

--- linux-2.6.18-rc5-mm1/include/net/sctp/sctp.h.old	2006-09-05 16:50:33.000000000 +0200
+++ linux-2.6.18-rc5-mm1/include/net/sctp/sctp.h	2006-09-05 16:54:18.000000000 +0200
@@ -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
  */
 
--- linux-2.6.18-rc5-mm1/net/sctp/socket.c.old	2006-09-05 16:49:15.000000000 +0200
+++ linux-2.6.18-rc5-mm1/net/sctp/socket.c	2006-09-05 16:49:27.000000000 +0200
@@ -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;
 
--- linux-2.6.18-rc5-mm1/net/sctp/ipv6.c.old	2006-09-05 16:50:51.000000000 +0200
+++ linux-2.6.18-rc5-mm1/net/sctp/ipv6.c	2006-09-05 16:50:58.000000000 +0200
@@ -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,
 };
--- linux-2.6.18-rc5-mm1/net/sctp/protocol.c.old	2006-09-05 16:53:10.000000000 +0200
+++ linux-2.6.18-rc5-mm1/net/sctp/protocol.c	2006-09-05 16:53:20.000000000 +0200
@@ -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)
 {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] net/sctp/: cleanups
  2006-09-05 21:57 [2.6 patch] net/sctp/: cleanups Adrian Bunk
@ 2006-09-05 23:44 ` Sridhar Samudrala
  2006-09-18  7:40   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Sridhar Samudrala @ 2006-09-05 23:44 UTC (permalink / raw)
  To: Adrian Bunk, davem
  Cc: lksctp-developers, netdev, linux-kernel, David Woodhouse

On Tue, 2006-09-05 at 23:57 +0200, Adrian Bunk wrote:
> 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>

> 
> ---
> 
>  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(-)
> 
> --- linux-2.6.18-rc5-mm1/include/net/sctp/sctp.h.old	2006-09-05 16:50:33.000000000 +0200
> +++ linux-2.6.18-rc5-mm1/include/net/sctp/sctp.h	2006-09-05 16:54:18.000000000 +0200
> @@ -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
>   */
>  
> --- linux-2.6.18-rc5-mm1/net/sctp/socket.c.old	2006-09-05 16:49:15.000000000 +0200
> +++ linux-2.6.18-rc5-mm1/net/sctp/socket.c	2006-09-05 16:49:27.000000000 +0200
> @@ -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;
>  
> --- linux-2.6.18-rc5-mm1/net/sctp/ipv6.c.old	2006-09-05 16:50:51.000000000 +0200
> +++ linux-2.6.18-rc5-mm1/net/sctp/ipv6.c	2006-09-05 16:50:58.000000000 +0200
> @@ -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,
>  };
> --- linux-2.6.18-rc5-mm1/net/sctp/protocol.c.old	2006-09-05 16:53:10.000000000 +0200
> +++ linux-2.6.18-rc5-mm1/net/sctp/protocol.c	2006-09-05 16:53:20.000000000 +0200
> @@ -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)
>  {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [2.6 patch] net/sctp/: cleanups
  2006-09-05 23:44 ` Sridhar Samudrala
@ 2006-09-18  7:40   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2006-09-18  7:40 UTC (permalink / raw)
  To: sri; +Cc: bunk, lksctp-developers, netdev, linux-kernel, dwmw2

From: Sridhar Samudrala <sri@us.ibm.com>
Date: Tue, 05 Sep 2006 16:44:21 -0700

> On Tue, 2006-09-05 at 23:57 +0200, Adrian Bunk wrote:
> > 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-18  7:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-05 21:57 [2.6 patch] net/sctp/: cleanups Adrian Bunk
2006-09-05 23:44 ` Sridhar Samudrala
2006-09-18  7:40   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).