]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
sctp: remove the typedef sctp_data_chunk_t
authorXin Long <lucien.xin@gmail.com>
Fri, 30 Jun 2017 03:52:20 +0000 (11:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Jul 2017 16:08:42 +0000 (09:08 -0700)
This patch is to remove the typedef sctp_data_chunk_t, and replace
with struct sctp_data_chunk in the places where it's using this
typedef.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sctp.h
include/net/sctp/constants.h
include/net/sctp/sm.h
net/sctp/output.c
net/sctp/sm_statefuns.c
net/sctp/ulpqueue.c

index 55d84c14312222bf6940e0d0e171720637293b3c..91c888f21b2470fda6072c59d2a1039f5fac83f1 100644 (file)
@@ -235,10 +235,10 @@ struct sctp_datahdr {
        __u8  payload[0];
 };
 
-typedef struct sctp_data_chunk {
+struct sctp_data_chunk {
        struct sctp_chunkhdr chunk_hdr;
        struct sctp_datahdr data_hdr;
-} sctp_data_chunk_t;
+};
 
 /* DATA Chuck Specific Flags */
 enum {
index 02e867bc4b43f7bb174c3e5e3b4c02f129dd87ad..9b18044c551eb6b81e21d7cb3f72068ad0cff67a 100644 (file)
@@ -152,7 +152,7 @@ SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, sctp_event_primitive_t, primitive)
 /* Calculate the actual data size in a data chunk */
 #define SCTP_DATA_SNDSIZE(c) ((int)((unsigned long)(c->chunk_end)\
                                - (unsigned long)(c->chunk_hdr)\
-                               - sizeof(sctp_data_chunk_t)))
+                               - sizeof(struct sctp_data_chunk)))
 
 /* Internal error codes */
 typedef enum {
index 245eb22230a2369ba6fa91520a5b31e55bc57824..860f378333b577b5f26357c512e34893a837cfe3 100644 (file)
@@ -347,7 +347,7 @@ static inline __u16 sctp_data_size(struct sctp_chunk *chunk)
        __u16 size;
 
        size = ntohs(chunk->chunk_hdr->length);
-       size -= sizeof(sctp_data_chunk_t);
+       size -= sizeof(struct sctp_data_chunk);
 
        return size;
 }
index 9bf9d84a96b784820aa607c4de3f8a39ae064572..9d8504985744f8153f985695e7123f48994d3494 100644 (file)
@@ -723,8 +723,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
        /* Check whether this chunk and all the rest of pending data will fit
         * or delay in hopes of bundling a full sized packet.
         */
-       if (chunk->skb->len + q->out_qlen >
-               transport->pathmtu - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
+       if (chunk->skb->len + q->out_qlen > transport->pathmtu -
+               packet->overhead - sizeof(struct sctp_data_chunk) - 4)
                /* Enough data queued to fill a packet */
                return SCTP_XMIT_OK;
 
index 1ba9a9b044660bef86c6214525be24791ed7f35d..212fe7614d08b8e251b3cc5a7a16337a1dc3b9b3 100644 (file)
@@ -2990,7 +2990,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net,
                return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
        }
 
-       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_data_chunk_t)))
+       if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_data_chunk)))
                return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
                                                  commands);
 
@@ -3109,7 +3109,7 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net,
                return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
        }
 
-       if (!sctp_chunk_length_valid(chunk, sizeof(sctp_data_chunk_t)))
+       if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_data_chunk)))
                return sctp_sf_violation_chunklen(net, ep, asoc, type, arg,
                                                  commands);
 
@@ -6262,7 +6262,7 @@ static int sctp_eat_data(const struct sctp_association *asoc,
         * Actually, allow a little bit of overflow (up to a MTU).
         */
        datalen = ntohs(chunk->chunk_hdr->length);
-       datalen -= sizeof(sctp_data_chunk_t);
+       datalen -= sizeof(struct sctp_data_chunk);
 
        deliver = SCTP_CMD_CHUNK_ULP;
 
index 25f7e4140566254cd277b708a7c4835477a0ff5f..0225d62a869f8deff10565c4625df0a10464ce87 100644 (file)
@@ -1090,7 +1090,7 @@ void sctp_ulpq_renege(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
 
        if (chunk) {
                needed = ntohs(chunk->chunk_hdr->length);
-               needed -= sizeof(sctp_data_chunk_t);
+               needed -= sizeof(struct sctp_data_chunk);
        } else
                needed = SCTP_DEFAULT_MAXWINDOW;