Commit 66b91d2c authored by Marcelo Ricardo Leitner's avatar Marcelo Ricardo Leitner Committed by David S. Miller

sctp: remove return value from sctp_packet_init/config

There is no reason to use this cascading. It doesn't add anything.
Let's remove it and simplify.
Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0630c56e
...@@ -722,10 +722,9 @@ struct sctp_packet { ...@@ -722,10 +722,9 @@ struct sctp_packet {
ipfragok:1; /* So let ip fragment this packet */ ipfragok:1; /* So let ip fragment this packet */
}; };
struct sctp_packet *sctp_packet_init(struct sctp_packet *, void sctp_packet_init(struct sctp_packet *, struct sctp_transport *,
struct sctp_transport *, __u16 sport, __u16 dport);
__u16 sport, __u16 dport); void sctp_packet_config(struct sctp_packet *, __u32 vtag, int);
struct sctp_packet *sctp_packet_config(struct sctp_packet *, __u32 vtag, int);
sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *, sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *,
struct sctp_chunk *, int, gfp_t); struct sctp_chunk *, int, gfp_t);
sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *, sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *,
......
...@@ -81,8 +81,8 @@ static void sctp_packet_reset(struct sctp_packet *packet) ...@@ -81,8 +81,8 @@ static void sctp_packet_reset(struct sctp_packet *packet)
/* Config a packet. /* Config a packet.
* This appears to be a followup set of initializations. * This appears to be a followup set of initializations.
*/ */
struct sctp_packet *sctp_packet_config(struct sctp_packet *packet, void sctp_packet_config(struct sctp_packet *packet, __u32 vtag,
__u32 vtag, int ecn_capable) int ecn_capable)
{ {
struct sctp_transport *tp = packet->transport; struct sctp_transport *tp = packet->transport;
struct sctp_association *asoc = tp->asoc; struct sctp_association *asoc = tp->asoc;
...@@ -123,14 +123,12 @@ struct sctp_packet *sctp_packet_config(struct sctp_packet *packet, ...@@ -123,14 +123,12 @@ struct sctp_packet *sctp_packet_config(struct sctp_packet *packet,
if (chunk) if (chunk)
sctp_packet_append_chunk(packet, chunk); sctp_packet_append_chunk(packet, chunk);
} }
return packet;
} }
/* Initialize the packet structure. */ /* Initialize the packet structure. */
struct sctp_packet *sctp_packet_init(struct sctp_packet *packet, void sctp_packet_init(struct sctp_packet *packet,
struct sctp_transport *transport, struct sctp_transport *transport,
__u16 sport, __u16 dport) __u16 sport, __u16 dport)
{ {
struct sctp_association *asoc = transport->asoc; struct sctp_association *asoc = transport->asoc;
size_t overhead; size_t overhead;
...@@ -151,8 +149,6 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet, ...@@ -151,8 +149,6 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet,
packet->overhead = overhead; packet->overhead = overhead;
sctp_packet_reset(packet); sctp_packet_reset(packet);
packet->vtag = 0; packet->vtag = 0;
return packet;
} }
/* Free a packet. */ /* Free a packet. */
......
...@@ -6032,8 +6032,9 @@ static struct sctp_packet *sctp_ootb_pkt_new(struct net *net, ...@@ -6032,8 +6032,9 @@ static struct sctp_packet *sctp_ootb_pkt_new(struct net *net,
sctp_transport_route(transport, (union sctp_addr *)&chunk->dest, sctp_transport_route(transport, (union sctp_addr *)&chunk->dest,
sctp_sk(net->sctp.ctl_sock)); sctp_sk(net->sctp.ctl_sock));
packet = sctp_packet_init(&transport->packet, transport, sport, dport); packet = &transport->packet;
packet = sctp_packet_config(packet, vtag, 0); sctp_packet_init(packet, transport, sport, dport);
sctp_packet_config(packet, vtag, 0);
return packet; return packet;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment