All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sctp: Make some local functions static
@ 2011-01-18 11:29 Holger Freyther
  2011-01-19  7:23 ` Wei Yongjun
  0 siblings, 1 reply; 6+ messages in thread
From: Holger Freyther @ 2011-01-18 11:29 UTC (permalink / raw)
  To: linux-sctp

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]


sparse proposed to mark these functions as static as they are
only accessed locally. This patch is doing that.

Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
---
 net/sctp/probe.c         |   10 +++++-----
 net/sctp/sm_make_chunk.c |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)



[-- Attachment #2: 0001-sctp-Make-some-local-functions-static.patch --]
[-- Type: text/x-patch, Size: 1326 bytes --]

diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index bc6cd75..4616548 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -122,11 +122,11 @@ static const struct file_operations sctpprobe_fops = {
 	.llseek = noop_llseek,
 };
 
-sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
-				     const struct sctp_association *asoc,
-				     const sctp_subtype_t type,
-				     void *arg,
-				     sctp_cmd_seq_t *commands)
+static sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
+					    const struct sctp_association *asoc,
+					    const sctp_subtype_t type,
+					    void *arg,
+					    sctp_cmd_seq_t *commands)
 {
 	struct sctp_transport *sp;
 	static __u32 lcwnd = 0;
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 9ea8ae7..912e534 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -132,8 +132,8 @@ void  sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
  * abort chunk.  Differs from sctp_init_cause in that it won't oops
  * if there isn't enough space in the op error chunk
  */
-int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code,
-		      size_t paylen)
+static int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code,
+				 size_t paylen)
 {
 	sctp_errhdr_t err;
 	__u16 len;


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

* Re: [PATCH] sctp: Make some local functions static
  2011-01-18 11:29 [PATCH] sctp: Make some local functions static Holger Freyther
@ 2011-01-19  7:23 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2011-01-19  7:23 UTC (permalink / raw)
  To: linux-sctp


> sparse proposed to mark these functions as static as they are
> only accessed locally. This patch is doing that.

It is OK to me.

Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>

Would your please send patch inline and cc to David and netdev@vger.kernel.org? thanks

> Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
> ---
>  net/sctp/probe.c         |   10 +++++-----
>  net/sctp/sm_make_chunk.c |    4 ++--
>  2 files changed, 7 insertions(+), 7 deletions(-)
>
>

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

* [PATCH] sctp: Make some local functions static
  2011-01-18 11:29 [PATCH] sctp: Make some local functions static Holger Freyther
@ 2011-03-23 10:48 ` Holger Hans Peter Freyther
  0 siblings, 0 replies; 6+ messages in thread
From: Holger Hans Peter Freyther @ 2011-03-23 10:48 UTC (permalink / raw)
  To: netdev; +Cc: linux-sctp

sparse proposed to mark these functions as static as they are
only accessed locally. This patch is doing that.

Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 net/sctp/probe.c         |   10 +++++-----
 net/sctp/sm_make_chunk.c |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index bc6cd75..4616548 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -122,11 +122,11 @@ static const struct file_operations sctpprobe_fops = {
 	.llseek = noop_llseek,
 };
 -sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
-				     const struct sctp_association *asoc,
-				     const sctp_subtype_t type,
-				     void *arg,
-				     sctp_cmd_seq_t *commands)
+static sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
+					    const struct sctp_association *asoc,
+					    const sctp_subtype_t type,
+					    void *arg,
+					    sctp_cmd_seq_t *commands)
 {
 	struct sctp_transport *sp;
 	static __u32 lcwnd = 0;
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index de98665..a8c0798 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -132,8 +132,8 @@ void  sctp_init_cause(struct sctp_chunk *chunk, __be16
cause_code,
  * abort chunk.  Differs from sctp_init_cause in that it won't oops
  * if there isn't enough space in the op error chunk
  */
-int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code,
-		      size_t paylen)
+static int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code,
+				 size_t paylen)
 {
 	sctp_errhdr_t err;
 	__u16 len;
-- 
1.7.4


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

* [PATCH] sctp: Make some local functions static
@ 2011-03-23 10:48 ` Holger Hans Peter Freyther
  0 siblings, 0 replies; 6+ messages in thread
From: Holger Hans Peter Freyther @ 2011-03-23 10:48 UTC (permalink / raw)
  To: netdev; +Cc: linux-sctp

sparse proposed to mark these functions as static as they are
only accessed locally. This patch is doing that.

Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 net/sctp/probe.c         |   10 +++++-----
 net/sctp/sm_make_chunk.c |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index bc6cd75..4616548 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -122,11 +122,11 @@ static const struct file_operations sctpprobe_fops = {
 	.llseek = noop_llseek,
 };
 -sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
-				     const struct sctp_association *asoc,
-				     const sctp_subtype_t type,
-				     void *arg,
-				     sctp_cmd_seq_t *commands)
+static sctp_disposition_t jsctp_sf_eat_sack(const struct sctp_endpoint *ep,
+					    const struct sctp_association *asoc,
+					    const sctp_subtype_t type,
+					    void *arg,
+					    sctp_cmd_seq_t *commands)
 {
 	struct sctp_transport *sp;
 	static __u32 lcwnd = 0;
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index de98665..a8c0798 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -132,8 +132,8 @@ void  sctp_init_cause(struct sctp_chunk *chunk, __be16
cause_code,
  * abort chunk.  Differs from sctp_init_cause in that it won't oops
  * if there isn't enough space in the op error chunk
  */
-int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code,
-		      size_t paylen)
+static int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code,
+				 size_t paylen)
 {
 	sctp_errhdr_t err;
 	__u16 len;
-- 
1.7.4


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

* Re: [PATCH] sctp: Make some local functions static
  2011-03-23 10:48 ` Holger Hans Peter Freyther
@ 2011-03-28  1:16   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-03-28  1:16 UTC (permalink / raw)
  To: holger; +Cc: netdev, linux-sctp

From: Holger Hans Peter Freyther <holger@freyther.de>
Date: Wed, 23 Mar 2011 11:48:07 +0100

> @@ -132,8 +132,8 @@ void  sctp_init_cause(struct sctp_chunk *chunk, __be16
> cause_code,

Your patches are corrupted by your email client, in particular it has
chopped up long lines.

Please fix your email setup, test it out by emailing both of your SCTP
patches to yourself, then try to apply the patches in the emails you
receive.

Then you can freshly resubmit them here.

Thank you.

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

* Re: [PATCH] sctp: Make some local functions static
@ 2011-03-28  1:16   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-03-28  1:16 UTC (permalink / raw)
  To: holger; +Cc: netdev, linux-sctp

From: Holger Hans Peter Freyther <holger@freyther.de>
Date: Wed, 23 Mar 2011 11:48:07 +0100

> @@ -132,8 +132,8 @@ void  sctp_init_cause(struct sctp_chunk *chunk, __be16
> cause_code,

Your patches are corrupted by your email client, in particular it has
chopped up long lines.

Please fix your email setup, test it out by emailing both of your SCTP
patches to yourself, then try to apply the patches in the emails you
receive.

Then you can freshly resubmit them here.

Thank you.

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

end of thread, other threads:[~2011-03-28  1:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 11:29 [PATCH] sctp: Make some local functions static Holger Freyther
2011-01-19  7:23 ` Wei Yongjun
2011-03-23 10:48 Holger Hans Peter Freyther
2011-03-23 10:48 ` Holger Hans Peter Freyther
2011-03-28  1:16 ` David Miller
2011-03-28  1:16   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.