Skip to contentSkip to conversation

sctp: make sctp_addto_chunk_fixed local

PATCH Applied Stephen Hemminger 4 participants 4 messages Jan 10, 2014 – Jan 13, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sctp: make sctp_addto_chunk_fixed local

---
 include/net/sctp/structs.h |    1 -
 net/sctp/sm_make_chunk.c   |    6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)
include/net/sctp/structs.h +0 -1
@@ -649,7 +649,6 @@ int sctp_user_addto_chunk(struct sctp_ch
 			  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_chunk_fixed(struct sctp_chunk *, int len, const void *data);
 struct sctp_chunk *sctp_chunkify(struct sk_buff *,
 				 const struct sctp_association *,
 				 struct sock *);
net/sctp/sm_make_chunk.c +4 -2
@@ -78,6 +78,8 @@ static int sctp_process_param(struct sct
 			      gfp_t gfp);
 static void *sctp_addto_param(struct sctp_chunk *chunk, int len,
 			      const void *data);
+static void  *sctp_addto_chunk_fixed(struct sctp_chunk *, int len,
+				     const void *data);
 
 /* Control chunk destructor */
 static void sctp_control_release_owner(struct sk_buff *skb)
@@ -1475,8 +1477,8 @@ void *sctp_addto_chunk(struct sctp_chunk
 /* Append bytes to the end of a chunk. Returns NULL if there isn't sufficient
  * space in the chunk
  */
-void *sctp_addto_chunk_fixed(struct sctp_chunk *chunk,
-			     int len, const void *data)
+static void *sctp_addto_chunk_fixed(struct sctp_chunk *chunk,
+				    int len, const void *data)
 {
 	if (skb_tailroom(chunk->skb) >= len)
 		return sctp_addto_chunk(chunk, len, data);
Acked-by on v1 1/1
#1 lore raw
Quoted 31 lines · Stephen Hemminger
---
 include/net/sctp/structs.h |    1 -
 net/sctp/sm_make_chunk.c   |    6 ++++--
 2 files changed, 4 insertions(+), 3 deletions(-)
include/net/sctp/structs.h +0 -1
@@ -649,7 +649,6 @@ int sctp_user_addto_chunk(struct sctp_ch
 			  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_chunk_fixed(struct sctp_chunk *, int len, const void *data);
 struct sctp_chunk *sctp_chunkify(struct sk_buff *,
 				 const struct sctp_association *,
 				 struct sock *);
net/sctp/sm_make_chunk.c +2 -0
@@ -78,6 +78,8 @@ static int sctp_process_param(struct sct
 			      gfp_t gfp);
 static void *sctp_addto_param(struct sctp_chunk *chunk, int len,
 			      const void *data);
+static void  *sctp_addto_chunk_fixed(struct sctp_chunk *, int len,
+				     const void *data);
 
 /* Control chunk destructor */
 static void sctp_control_release_owner(struct sk_buff *skb)

net/sctp/sm_make_chunk.c void *sctp_addto_chunk(struct sctp_chunk · line 1484

Quoted 10 lines
net/sctp/sm_make_chunk.c +2 -2
@@ -1475,8 +1477,8 @@ void *sctp_addto_chunk(struct sctp_chunk
 /* Append bytes to the end of a chunk. Returns NULL if there isn't sufficient
  * space in the chunk
  */
-void *sctp_addto_chunk_fixed(struct sctp_chunk *chunk,
-			     int len, const void *data)
+static void *sctp_addto_chunk_fixed(struct sctp_chunk *chunk,
+				    int len, const void *data)
 {
 	if (skb_tailroom(chunk->skb) >= len)
 		return sctp_addto_chunk(chunk, len, data);
#2 lore raw
In reply to Stephen Hemminger

Hello.

Quoted 1 line · Stephen Hemminger

[...]

net/sctp/sm_make_chunk.c static int sctp_process_param(struct sct · line 81

Quoted 7 lines
net/sctp/sm_make_chunk.c +1 -0
@@ -78,6 +78,8 @@ static int sctp_process_param(struct sct
  			      gfp_t gfp);
  static void *sctp_addto_param(struct sctp_chunk *chunk, int len,
  			      const void *data);
+static void  *sctp_addto_chunk_fixed(struct sctp_chunk *, int len,

Sorry for nitpicking but two spaces after 'void' don't align well with the
previous declaration. Probably can be fixed while applying...

net/sctp/sm_make_chunk.c static int sctp_process_param(struct sct · line 85

Quoted 4 lines
net/sctp/sm_make_chunk.c +1 -0
+				     const void *data);
 
  /* Control chunk destructor */
  static void sctp_control_release_owner(struct sk_buff *skb)

WBR, Sergei