From 5210601945f5aedaf2d7f13a88436e27a39c6a8a Mon Sep 17 00:00:00 2001 From: Xin Long Date: Sat, 5 Aug 2017 19:59:59 +0800 Subject: sctp: remove the typedef sctp_state_t This patch is to remove the typedef sctp_state_t, and replace with enum sctp_state in the places where it's using this typedef. Signed-off-by: Xin Long Signed-off-by: David S. Miller --- net/sctp/endpointola.c | 2 +- net/sctp/primitive.c | 2 +- net/sctp/sm_sideeffect.c | 12 ++++++------ net/sctp/sm_statetable.c | 16 +++++++++------- 4 files changed, 17 insertions(+), 15 deletions(-) (limited to 'net/sctp') diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 3d506b2f6193..4111c00a9d9d 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c @@ -383,7 +383,7 @@ static void sctp_endpoint_bh_rcv(struct work_struct *work) struct sctp_chunk *chunk; struct sctp_inq *inqueue; sctp_subtype_t subtype; - sctp_state_t state; + enum sctp_state state; int error = 0; int first_time = 1; /* is this the first time through the loop */ diff --git a/net/sctp/primitive.c b/net/sctp/primitive.c index f0553a022859..1fb5b9bb3c6d 100644 --- a/net/sctp/primitive.c +++ b/net/sctp/primitive.c @@ -54,7 +54,7 @@ int sctp_primitive_ ## name(struct net *net, struct sctp_association *asoc, \ void *arg) { \ int error = 0; \ sctp_event_t event_type; sctp_subtype_t subtype; \ - sctp_state_t state; \ + enum sctp_state state; \ struct sctp_endpoint *ep; \ \ event_type = SCTP_EVENT_T_PRIMITIVE; \ diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 5dda8c42b5f6..b77a81aa907b 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c @@ -53,7 +53,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, sctp_subtype_t subtype, - sctp_state_t state, + enum sctp_state state, struct sctp_endpoint *ep, struct sctp_association *asoc, void *event_arg, @@ -61,7 +61,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, sctp_cmd_seq_t *commands, gfp_t gfp); static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, - sctp_state_t state, + enum sctp_state state, struct sctp_endpoint *ep, struct sctp_association **asoc, void *event_arg, @@ -843,7 +843,7 @@ static void sctp_cmd_assoc_update(sctp_cmd_seq_t *cmds, /* Helper function to change the state of an association. */ static void sctp_cmd_new_state(sctp_cmd_seq_t *cmds, struct sctp_association *asoc, - sctp_state_t state) + enum sctp_state state) { struct sock *sk = asoc->base.sk; @@ -1140,7 +1140,7 @@ static void sctp_cmd_send_asconf(struct sctp_association *asoc) * good place to start. */ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype, - sctp_state_t state, + enum sctp_state state, struct sctp_endpoint *ep, struct sctp_association *asoc, void *event_arg, @@ -1179,7 +1179,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype, * This the master state function side effect processing function. *****************************************************************/ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, - sctp_state_t state, + enum sctp_state state, struct sctp_endpoint *ep, struct sctp_association **asoc, void *event_arg, @@ -1265,7 +1265,7 @@ bail: /* This is the side-effect interpreter. */ static int sctp_cmd_interpreter(sctp_event_t event_type, sctp_subtype_t subtype, - sctp_state_t state, + enum sctp_state state, struct sctp_endpoint *ep, struct sctp_association *asoc, void *event_arg, diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c index 3e958c1c4b95..f46c11bffea7 100644 --- a/net/sctp/sm_statetable.c +++ b/net/sctp/sm_statetable.c @@ -52,9 +52,10 @@ other_event_table[SCTP_NUM_OTHER_TYPES][SCTP_STATE_NUM_STATES]; static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][SCTP_STATE_NUM_STATES]; -static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(struct net *net, - enum sctp_cid cid, - sctp_state_t state); +static const sctp_sm_table_entry_t *sctp_chunk_event_lookup( + struct net *net, + enum sctp_cid cid, + enum sctp_state state); static const sctp_sm_table_entry_t bug = { @@ -78,7 +79,7 @@ static const sctp_sm_table_entry_t bug = { const sctp_sm_table_entry_t *sctp_sm_lookup_event(struct net *net, sctp_event_t event_type, - sctp_state_t state, + enum sctp_state state, sctp_subtype_t event_subtype) { switch (event_type) { @@ -967,9 +968,10 @@ static const sctp_sm_table_entry_t timeout_event_table[SCTP_NUM_TIMEOUT_TYPES][S TYPE_SCTP_EVENT_TIMEOUT_AUTOCLOSE, }; -static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(struct net *net, - enum sctp_cid cid, - sctp_state_t state) +static const sctp_sm_table_entry_t *sctp_chunk_event_lookup( + struct net *net, + enum sctp_cid cid, + enum sctp_state state) { if (state > SCTP_STATE_MAX) return &bug; -- cgit v1.2.3