Commit 19cd1592 authored by Xin Long's avatar Xin Long Committed by David S. Miller

sctp: remove the typedef sctp_event_timeout_t

This patch is to remove the typedef sctp_event_timeout_t, and
replace with enum sctp_event_timeout in the places where it's
using this typedef.
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a0f098d0
...@@ -127,7 +127,7 @@ typedef union { ...@@ -127,7 +127,7 @@ typedef union {
int error; int error;
__be16 err; __be16 err;
enum sctp_state state; enum sctp_state state;
sctp_event_timeout_t to; enum sctp_event_timeout to;
struct sctp_chunk *chunk; struct sctp_chunk *chunk;
struct sctp_association *asoc; struct sctp_association *asoc;
struct sctp_transport *transport; struct sctp_transport *transport;
...@@ -168,7 +168,7 @@ SCTP_ARG_CONSTRUCTOR(U8, __u8, u8) ...@@ -168,7 +168,7 @@ SCTP_ARG_CONSTRUCTOR(U8, __u8, u8)
SCTP_ARG_CONSTRUCTOR(ERROR, int, error) SCTP_ARG_CONSTRUCTOR(ERROR, int, error)
SCTP_ARG_CONSTRUCTOR(PERR, __be16, err) /* protocol error */ SCTP_ARG_CONSTRUCTOR(PERR, __be16, err) /* protocol error */
SCTP_ARG_CONSTRUCTOR(STATE, enum sctp_state, state) SCTP_ARG_CONSTRUCTOR(STATE, enum sctp_state, state)
SCTP_ARG_CONSTRUCTOR(TO, sctp_event_timeout_t, to) SCTP_ARG_CONSTRUCTOR(TO, enum sctp_event_timeout, to)
SCTP_ARG_CONSTRUCTOR(CHUNK, struct sctp_chunk *, chunk) SCTP_ARG_CONSTRUCTOR(CHUNK, struct sctp_chunk *, chunk)
SCTP_ARG_CONSTRUCTOR(ASOC, struct sctp_association *, asoc) SCTP_ARG_CONSTRUCTOR(ASOC, struct sctp_association *, asoc)
SCTP_ARG_CONSTRUCTOR(TRANSPORT, struct sctp_transport *, transport) SCTP_ARG_CONSTRUCTOR(TRANSPORT, struct sctp_transport *, transport)
......
...@@ -84,7 +84,7 @@ typedef enum { ...@@ -84,7 +84,7 @@ typedef enum {
* SCTP_ULP_* to the list of possible chunks. * SCTP_ULP_* to the list of possible chunks.
*/ */
typedef enum { enum sctp_event_timeout {
SCTP_EVENT_TIMEOUT_NONE = 0, SCTP_EVENT_TIMEOUT_NONE = 0,
SCTP_EVENT_TIMEOUT_T1_COOKIE, SCTP_EVENT_TIMEOUT_T1_COOKIE,
SCTP_EVENT_TIMEOUT_T1_INIT, SCTP_EVENT_TIMEOUT_T1_INIT,
...@@ -96,7 +96,7 @@ typedef enum { ...@@ -96,7 +96,7 @@ typedef enum {
SCTP_EVENT_TIMEOUT_RECONF, SCTP_EVENT_TIMEOUT_RECONF,
SCTP_EVENT_TIMEOUT_SACK, SCTP_EVENT_TIMEOUT_SACK,
SCTP_EVENT_TIMEOUT_AUTOCLOSE, SCTP_EVENT_TIMEOUT_AUTOCLOSE,
} sctp_event_timeout_t; };
#define SCTP_EVENT_TIMEOUT_MAX SCTP_EVENT_TIMEOUT_AUTOCLOSE #define SCTP_EVENT_TIMEOUT_MAX SCTP_EVENT_TIMEOUT_AUTOCLOSE
#define SCTP_NUM_TIMEOUT_TYPES (SCTP_EVENT_TIMEOUT_MAX + 1) #define SCTP_NUM_TIMEOUT_TYPES (SCTP_EVENT_TIMEOUT_MAX + 1)
...@@ -131,7 +131,7 @@ enum sctp_event_primitive { ...@@ -131,7 +131,7 @@ enum sctp_event_primitive {
typedef union { typedef union {
enum sctp_cid chunk; enum sctp_cid chunk;
sctp_event_timeout_t timeout; enum sctp_event_timeout timeout;
enum sctp_event_other other; enum sctp_event_other other;
enum sctp_event_primitive primitive; enum sctp_event_primitive primitive;
} sctp_subtype_t; } sctp_subtype_t;
...@@ -142,7 +142,7 @@ SCTP_ST_## _name (_type _arg) \ ...@@ -142,7 +142,7 @@ SCTP_ST_## _name (_type _arg) \
{ sctp_subtype_t _retval; _retval._elt = _arg; return _retval; } { sctp_subtype_t _retval; _retval._elt = _arg; return _retval; }
SCTP_SUBTYPE_CONSTRUCTOR(CHUNK, enum sctp_cid, chunk) SCTP_SUBTYPE_CONSTRUCTOR(CHUNK, enum sctp_cid, chunk)
SCTP_SUBTYPE_CONSTRUCTOR(TIMEOUT, sctp_event_timeout_t, timeout) SCTP_SUBTYPE_CONSTRUCTOR(TIMEOUT, enum sctp_event_timeout, timeout)
SCTP_SUBTYPE_CONSTRUCTOR(OTHER, enum sctp_event_other, other) SCTP_SUBTYPE_CONSTRUCTOR(OTHER, enum sctp_event_other, other)
SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, enum sctp_event_primitive, primitive) SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, enum sctp_event_primitive, primitive)
......
...@@ -280,7 +280,7 @@ void sctp_generate_t3_rtx_event(unsigned long peer) ...@@ -280,7 +280,7 @@ void sctp_generate_t3_rtx_event(unsigned long peer)
* for timeouts which use the association as their parameter. * for timeouts which use the association as their parameter.
*/ */
static void sctp_generate_timeout_event(struct sctp_association *asoc, static void sctp_generate_timeout_event(struct sctp_association *asoc,
sctp_event_timeout_t timeout_type) enum sctp_event_timeout timeout_type)
{ {
struct sock *sk = asoc->base.sk; struct sock *sk = asoc->base.sk;
struct net *net = sock_net(sk); struct net *net = sock_net(sk);
...@@ -1052,8 +1052,8 @@ static void sctp_cmd_adaptation_ind(sctp_cmd_seq_t *commands, ...@@ -1052,8 +1052,8 @@ static void sctp_cmd_adaptation_ind(sctp_cmd_seq_t *commands,
static void sctp_cmd_t1_timer_update(struct sctp_association *asoc, static void sctp_cmd_t1_timer_update(struct sctp_association *asoc,
sctp_event_timeout_t timer, enum sctp_event_timeout timer,
char *name) char *name)
{ {
struct sctp_transport *t; struct sctp_transport *t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment