[2.6 patch] make sctp_addto_param() static

Subsystems: networking [general], sctp protocol, the rest

STALE6911d

4 messages, 4 authors, 2007-09-12 · open the first message on its own page

[2.6 patch] make sctp_addto_param() static

From: Adrian Bunk <bunk@kernel.org>
Date: 2007-09-09 20:30:23

sctp_addto_param() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 include/net/sctp/structs.h |    1 
 net/sctp/sm_make_chunk.c   |   39 ++++++++++++++++++-------------------
 2 files changed, 20 insertions(+), 20 deletions(-)

38f8064114b9e89a6a911b2e3625a41cdb477bcd 
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index c0d5848..ee4559b 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -726,7 +726,6 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len,
 			  struct iovec *data);
 void sctp_chunk_free(struct sctp_chunk *);
 void  *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data);
-void  *sctp_addto_param(struct sctp_chunk *, int len, const void *data);
 struct sctp_chunk *sctp_chunkify(struct sk_buff *,
 				 const struct sctp_association *,
 				 struct sock *);
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 79856c9..cf3b560 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -839,6 +839,26 @@ err_chunk:
 	return retval;
 }
 
+/* Append bytes to the end of a parameter.  Will panic if chunk is not big
+ * enough.
+ */
+static void *sctp_addto_param(struct sctp_chunk *chunk, int len,
+			      const void *data)
+{
+	void *target;
+	int chunklen = ntohs(chunk->chunk_hdr->length);
+
+	target = skb_put(chunk->skb, len);
+
+	memcpy(target, data, len);
+
+	/* Adjust the chunk length field.  */
+	chunk->chunk_hdr->length = htons(chunklen + len);
+	chunk->chunk_end = skb_tail_pointer(chunk->skb);
+
+	return target;
+}
+
 /* Make an ABORT chunk with a PROTOCOL VIOLATION cause code. */
 struct sctp_chunk *sctp_make_abort_violation(
 	const struct sctp_association *asoc,
@@ -1146,25 +1166,6 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data)
 	return target;
 }
 
-/* Append bytes to the end of a parameter.  Will panic if chunk is not big
- * enough.
- */
-void *sctp_addto_param(struct sctp_chunk *chunk, int len, const void *data)
-{
-	void *target;
-	int chunklen = ntohs(chunk->chunk_hdr->length);
-
-	target = skb_put(chunk->skb, len);
-
-	memcpy(target, data, len);
-
-	/* Adjust the chunk length field.  */
-	chunk->chunk_hdr->length = htons(chunklen + len);
-	chunk->chunk_end = skb_tail_pointer(chunk->skb);
-
-	return target;
-}
-
 /* Append bytes from user space to the end of a chunk.  Will panic if
  * chunk is not big enough.
  * Returns a kernel err value.

Re: [2.6 patch] make sctp_addto_param() static

From: Vlad Yasevich <hidden>
Date: 2007-09-10 13:41:11

Adrian Bunk wrote:
sctp_addto_param() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Ack

-vlad

Re: [Lksctp-developers] [2.6 patch] make sctp_addto_param() static

From: Neil Horman <nhorman@tuxdriver.com>
Date: 2007-09-10 13:45:09

On Sun, Sep 09, 2007 at 10:25:50PM +0200, Adrian Bunk wrote:
sctp_addto_param() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
ACK, seems reasonable to me.
Neil


-- 
/***************************************************
 *Neil Horman
 *nhorman@tuxdriver.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/

Re: [2.6 patch] make sctp_addto_param() static

From: David Miller <davem@davemloft.net>
Date: 2007-09-12 13:17:39

From: Adrian Bunk <bunk@kernel.org>
Date: Sun, 9 Sep 2007 22:25:50 +0200
sctp_addto_param() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help