Skip to content

Commit afd93b7

Browse files
lxindavem330
authored andcommitted
sctp: remove the typedef sctp_sack_variable_t
This patch is to remove the typedef sctp_sack_variable_t, and replace with union sctp_sack_variable in the places where it's using this typedef. It is also to fix some indents in sctp_acked(). Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9b41515 commit afd93b7

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎include/linux/sctp.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,17 +368,17 @@ struct sctp_gap_ack_block {
368368
__be16 end;
369369
};
370370

371-
typedef union {
371+
union sctp_sack_variable {
372372
struct sctp_gap_ack_block gab;
373373
__be32 dup;
374-
} sctp_sack_variable_t;
374+
};
375375

376376
typedef struct sctp_sackhdr {
377377
__be32 cum_tsn_ack;
378378
__be32 a_rwnd;
379379
__be16 num_gap_ack_blocks;
380380
__be16 num_dup_tsns;
381-
sctp_sack_variable_t variable[0];
381+
union sctp_sack_variable variable[0];
382382
} sctp_sackhdr_t;
383383

384384
typedef struct sctp_sack_chunk {

‎net/sctp/outqueue.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ static void sctp_outq_flush(struct sctp_outq *q, int rtx_timeout, gfp_t gfp)
11971197
static void sctp_sack_update_unack_data(struct sctp_association *assoc,
11981198
struct sctp_sackhdr *sack)
11991199
{
1200-
sctp_sack_variable_t *frags;
1200+
union sctp_sack_variable *frags;
12011201
__u16 unack_data;
12021202
int i;
12031203

@@ -1224,7 +1224,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_chunk *chunk)
12241224
struct sctp_transport *transport;
12251225
struct sctp_chunk *tchunk = NULL;
12261226
struct list_head *lchunk, *transport_list, *temp;
1227-
sctp_sack_variable_t *frags = sack->variable;
1227+
union sctp_sack_variable *frags = sack->variable;
12281228
__u32 sack_ctsn, ctsn, tsn;
12291229
__u32 highest_tsn, highest_new_tsn;
12301230
__u32 sack_a_rwnd;
@@ -1736,10 +1736,10 @@ static void sctp_mark_missing(struct sctp_outq *q,
17361736
/* Is the given TSN acked by this packet? */
17371737
static int sctp_acked(struct sctp_sackhdr *sack, __u32 tsn)
17381738
{
1739-
int i;
1740-
sctp_sack_variable_t *frags;
1741-
__u16 tsn_offset, blocks;
17421739
__u32 ctsn = ntohl(sack->cum_tsn_ack);
1740+
union sctp_sack_variable *frags;
1741+
__u16 tsn_offset, blocks;
1742+
int i;
17431743

17441744
if (TSN_lte(tsn, ctsn))
17451745
goto pass;

0 commit comments

Comments
 (0)