aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-08-05 19:59:59 +0800
committerDavid S. Miller <davem@davemloft.net>2017-08-06 21:33:42 -0700
commit5210601945f5aedaf2d7f13a88436e27a39c6a8a (patch)
tree0b196af33c9451344db77f832dbc4d26188e10e5 /include
parentsctp: remove the typedef sctp_ierror_t (diff)
downloadlinux-dev-5210601945f5aedaf2d7f13a88436e27a39c6a8a.tar.xz
linux-dev-5210601945f5aedaf2d7f13a88436e27a39c6a8a.zip
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 <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/command.h4
-rw-r--r--include/net/sctp/constants.h4
-rw-r--r--include/net/sctp/sctp.h2
-rw-r--r--include/net/sctp/sm.h10
-rw-r--r--include/net/sctp/structs.h2
5 files changed, 11 insertions, 11 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index 1d5f6ff3f440..be12ec946628 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -126,7 +126,7 @@ typedef union {
__u8 u8;
int error;
__be16 err;
- sctp_state_t state;
+ enum sctp_state state;
sctp_event_timeout_t to;
struct sctp_chunk *chunk;
struct sctp_association *asoc;
@@ -167,7 +167,7 @@ SCTP_ARG_CONSTRUCTOR(U16, __u16, u16)
SCTP_ARG_CONSTRUCTOR(U8, __u8, u8)
SCTP_ARG_CONSTRUCTOR(ERROR, int, error)
SCTP_ARG_CONSTRUCTOR(PERR, __be16, err) /* protocol error */
-SCTP_ARG_CONSTRUCTOR(STATE, sctp_state_t, state)
+SCTP_ARG_CONSTRUCTOR(STATE, enum sctp_state, state)
SCTP_ARG_CONSTRUCTOR(TO, sctp_event_timeout_t, to)
SCTP_ARG_CONSTRUCTOR(CHUNK, struct sctp_chunk *, chunk)
SCTP_ARG_CONSTRUCTOR(ASOC, struct sctp_association *, asoc)
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index 9a694653b708..db9f40b657ba 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -181,7 +181,7 @@ enum sctp_ierror {
/* SCTP state defines for internal state machine */
-typedef enum {
+enum sctp_state {
SCTP_STATE_CLOSED = 0,
SCTP_STATE_COOKIE_WAIT = 1,
@@ -192,7 +192,7 @@ typedef enum {
SCTP_STATE_SHUTDOWN_RECEIVED = 6,
SCTP_STATE_SHUTDOWN_ACK_SENT = 7,
-} sctp_state_t;
+};
#define SCTP_STATE_MAX SCTP_STATE_SHUTDOWN_ACK_SENT
#define SCTP_STATE_NUM_STATES (SCTP_STATE_MAX + 1)
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 0022bc713434..24ff7931d38c 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -558,7 +558,7 @@ static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style)
/* Is the association in this state? */
#define sctp_state(asoc, state) __sctp_state((asoc), (SCTP_STATE_##state))
static inline int __sctp_state(const struct sctp_association *asoc,
- sctp_state_t state)
+ enum sctp_state state)
{
return asoc->state == state;
}
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 860f378333b5..281e8d1e0752 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -175,10 +175,10 @@ sctp_state_fn_t sctp_sf_autoclose_timer_expire;
/* Prototypes for utility support functions. */
__u8 sctp_get_chunk_type(struct sctp_chunk *chunk);
-const sctp_sm_table_entry_t *sctp_sm_lookup_event(struct net *,
- sctp_event_t,
- sctp_state_t,
- sctp_subtype_t);
+const sctp_sm_table_entry_t *sctp_sm_lookup_event(struct net *net,
+ sctp_event_t event_type,
+ enum sctp_state state,
+ sctp_subtype_t event_subtype);
int sctp_chunk_iif(const struct sctp_chunk *);
struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *,
struct sctp_chunk *,
@@ -313,7 +313,7 @@ struct sctp_chunk *sctp_process_strreset_resp(
/* Prototypes for statetable processing. */
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 *,
struct sctp_association *asoc,
void *event_arg,
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 6fab67e7f1e5..fbe6e81b889b 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1577,7 +1577,7 @@ struct sctp_association {
*
* State takes values from SCTP_STATE_*.
*/
- sctp_state_t state;
+ enum sctp_state state;
/* Overall : The overall association error count.
* Error Count : [Clear this any time I get something.]