diff options
author | Xin Long <lucien.xin@gmail.com> | 2016-09-13 14:04:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-18 22:02:33 -0400 |
commit | 83dbc3d4a38411ef38f680d7045c8478cc9c5a56 (patch) | |
tree | c5dd0adc5b4219b2b9538bdef825d1c5f08d7009 /net/sctp/outqueue.c | |
parent | 645194409b0634a43890ec27c491c368b3bffc07 (diff) |
sctp: make sctp_outq_flush/tail/uncork return void
sctp_outq_flush return value is meaningless now, this patch is
to make sctp_outq_flush return void, as well as sctp_outq_fail
and sctp_outq_uncork.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/outqueue.c')
-rw-r--r-- | net/sctp/outqueue.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 052a4796a457..8c3f446d965c 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -68,7 +68,7 @@ static void sctp_mark_missing(struct sctp_outq *q, | |||
68 | 68 | ||
69 | static void sctp_generate_fwdtsn(struct sctp_outq *q, __u32 sack_ctsn); | 69 | static void sctp_generate_fwdtsn(struct sctp_outq *q, __u32 sack_ctsn); |
70 | 70 | ||
71 | static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp); | 71 | static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp); |
72 | 72 | ||
73 | /* Add data to the front of the queue. */ | 73 | /* Add data to the front of the queue. */ |
74 | static inline void sctp_outq_head_data(struct sctp_outq *q, | 74 | static inline void sctp_outq_head_data(struct sctp_outq *q, |
@@ -285,10 +285,9 @@ void sctp_outq_free(struct sctp_outq *q) | |||
285 | } | 285 | } |
286 | 286 | ||
287 | /* Put a new chunk in an sctp_outq. */ | 287 | /* Put a new chunk in an sctp_outq. */ |
288 | int sctp_outq_tail(struct sctp_outq *q, struct sctp_chunk *chunk, gfp_t gfp) | 288 | void sctp_outq_tail(struct sctp_outq *q, struct sctp_chunk *chunk, gfp_t gfp) |
289 | { | 289 | { |
290 | struct net *net = sock_net(q->asoc->base.sk); | 290 | struct net *net = sock_net(q->asoc->base.sk); |
291 | int error = 0; | ||
292 | 291 | ||
293 | pr_debug("%s: outq:%p, chunk:%p[%s]\n", __func__, q, chunk, | 292 | pr_debug("%s: outq:%p, chunk:%p[%s]\n", __func__, q, chunk, |
294 | chunk && chunk->chunk_hdr ? | 293 | chunk && chunk->chunk_hdr ? |
@@ -318,9 +317,7 @@ int sctp_outq_tail(struct sctp_outq *q, struct sctp_chunk *chunk, gfp_t gfp) | |||
318 | } | 317 | } |
319 | 318 | ||
320 | if (!q->cork) | 319 | if (!q->cork) |
321 | error = sctp_outq_flush(q, 0, gfp); | 320 | sctp_outq_flush(q, 0, gfp); |
322 | |||
323 | return error; | ||
324 | } | 321 | } |
325 | 322 | ||
326 | /* Insert a chunk into the sorted list based on the TSNs. The retransmit list | 323 | /* Insert a chunk into the sorted list based on the TSNs. The retransmit list |
@@ -748,12 +745,12 @@ redo: | |||
748 | } | 745 | } |
749 | 746 | ||
750 | /* Cork the outqueue so queued chunks are really queued. */ | 747 | /* Cork the outqueue so queued chunks are really queued. */ |
751 | int sctp_outq_uncork(struct sctp_outq *q, gfp_t gfp) | 748 | void sctp_outq_uncork(struct sctp_outq *q, gfp_t gfp) |
752 | { | 749 | { |
753 | if (q->cork) | 750 | if (q->cork) |
754 | q->cork = 0; | 751 | q->cork = 0; |
755 | 752 | ||
756 | return sctp_outq_flush(q, 0, gfp); | 753 | sctp_outq_flush(q, 0, gfp); |
757 | } | 754 | } |
758 | 755 | ||
759 | 756 | ||
@@ -766,7 +763,7 @@ int sctp_outq_uncork(struct sctp_outq *q, gfp_t gfp) | |||
766 | * locking concerns must be made. Today we use the sock lock to protect | 763 | * locking concerns must be made. Today we use the sock lock to protect |
767 | * this function. | 764 | * this function. |
768 | */ | 765 | */ |
769 | static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp) | 766 | static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp) |
770 | { | 767 | { |
771 | struct sctp_packet *packet; | 768 | struct sctp_packet *packet; |
772 | struct sctp_packet singleton; | 769 | struct sctp_packet singleton; |
@@ -891,7 +888,7 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp) | |||
891 | error = sctp_packet_transmit(&singleton, gfp); | 888 | error = sctp_packet_transmit(&singleton, gfp); |
892 | if (error < 0) { | 889 | if (error < 0) { |
893 | asoc->base.sk->sk_err = -error; | 890 | asoc->base.sk->sk_err = -error; |
894 | return 0; | 891 | return; |
895 | } | 892 | } |
896 | break; | 893 | break; |
897 | 894 | ||
@@ -1175,8 +1172,6 @@ sctp_flush_out: | |||
1175 | /* Clear the burst limited state, if any */ | 1172 | /* Clear the burst limited state, if any */ |
1176 | sctp_transport_burst_reset(t); | 1173 | sctp_transport_burst_reset(t); |
1177 | } | 1174 | } |
1178 | |||
1179 | return 0; | ||
1180 | } | 1175 | } |
1181 | 1176 | ||
1182 | /* Update unack_data based on the incoming SACK chunk */ | 1177 | /* Update unack_data based on the incoming SACK chunk */ |