Skip to content

Commit e2c3108

Browse files
lxindavem330
authored andcommitted
sctp: remove the typedef sctp_cmd_t
This patch is to remove the typedef sctp_cmd_t, and replace with enum sctp_cmd 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>
1 parent b7ef261 commit e2c3108

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎include/net/sctp/command.h‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ static inline sctp_arg_t SCTP_NULL(void)
196196
return retval;
197197
}
198198

199-
typedef struct {
199+
struct sctp_cmd {
200200
sctp_arg_t obj;
201201
sctp_verb_t verb;
202-
} sctp_cmd_t;
202+
};
203203

204204
typedef struct {
205-
sctp_cmd_t cmds[SCTP_MAX_NUM_COMMANDS];
206-
sctp_cmd_t *last_used_slot;
207-
sctp_cmd_t *next_cmd;
205+
struct sctp_cmd cmds[SCTP_MAX_NUM_COMMANDS];
206+
struct sctp_cmd *last_used_slot;
207+
struct sctp_cmd *next_cmd;
208208
} sctp_cmd_seq_t;
209209

210210

@@ -228,7 +228,7 @@ static inline int sctp_init_cmd_seq(sctp_cmd_seq_t *seq)
228228
static inline void sctp_add_cmd_sf(sctp_cmd_seq_t *seq, sctp_verb_t verb,
229229
sctp_arg_t obj)
230230
{
231-
sctp_cmd_t *cmd = seq->last_used_slot - 1;
231+
struct sctp_cmd *cmd = seq->last_used_slot - 1;
232232

233233
BUG_ON(cmd < seq->cmds);
234234

@@ -240,7 +240,7 @@ static inline void sctp_add_cmd_sf(sctp_cmd_seq_t *seq, sctp_verb_t verb,
240240
/* Return the next command structure in an sctp_cmd_seq.
241241
* Return NULL at the end of the sequence.
242242
*/
243-
static inline sctp_cmd_t *sctp_next_cmd(sctp_cmd_seq_t *seq)
243+
static inline struct sctp_cmd *sctp_next_cmd(sctp_cmd_seq_t *seq)
244244
{
245245
if (seq->next_cmd <= seq->last_used_slot)
246246
return NULL;

‎net/sctp/sm_sideeffect.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ static int sctp_cmd_interpreter(enum sctp_event event_type,
12771277
struct sctp_sock *sp = sctp_sk(sk);
12781278
int error = 0;
12791279
int force;
1280-
sctp_cmd_t *cmd;
1280+
struct sctp_cmd *cmd;
12811281
struct sctp_chunk *new_obj;
12821282
struct sctp_chunk *chunk = NULL;
12831283
struct sctp_packet *packet;

0 commit comments

Comments
 (0)