summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-08-10 22:23:51 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-11 13:02:44 -0400
commite2c3108ab25b4dbab3821e8b6084bfb73afb655c (patch)
tree190beef860c49bec18b10abe1cc54a673a6c9f1c
parentb7ef2618a0bf75c1e480b05739b0c5f2a42081cd (diff)
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>
-rw-r--r--include/net/sctp/command.h14
-rw-r--r--net/sctp/sm_sideeffect.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index 376cb78b6247..4e9e589b8f18 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -196,15 +196,15 @@ static inline sctp_arg_t SCTP_NULL(void)
196 return retval; 196 return retval;
197} 197}
198 198
199typedef struct { 199struct sctp_cmd {
200 sctp_arg_t obj; 200 sctp_arg_t obj;
201 sctp_verb_t verb; 201 sctp_verb_t verb;
202} sctp_cmd_t; 202};
203 203
204typedef struct { 204typedef struct {
205 sctp_cmd_t cmds[SCTP_MAX_NUM_COMMANDS]; 205 struct sctp_cmd cmds[SCTP_MAX_NUM_COMMANDS];
206 sctp_cmd_t *last_used_slot; 206 struct sctp_cmd *last_used_slot;
207 sctp_cmd_t *next_cmd; 207 struct sctp_cmd *next_cmd;
208} sctp_cmd_seq_t; 208} sctp_cmd_seq_t;
209 209
210 210
@@ -228,7 +228,7 @@ static inline int sctp_init_cmd_seq(sctp_cmd_seq_t *seq)
228static inline void sctp_add_cmd_sf(sctp_cmd_seq_t *seq, sctp_verb_t verb, 228static inline void sctp_add_cmd_sf(sctp_cmd_seq_t *seq, sctp_verb_t verb,
229 sctp_arg_t obj) 229 sctp_arg_t obj)
230{ 230{
231 sctp_cmd_t *cmd = seq->last_used_slot - 1; 231 struct sctp_cmd *cmd = seq->last_used_slot - 1;
232 232
233 BUG_ON(cmd < seq->cmds); 233 BUG_ON(cmd < seq->cmds);
234 234
@@ -240,7 +240,7 @@ static inline void sctp_add_cmd_sf(sctp_cmd_seq_t *seq, sctp_verb_t verb,
240/* Return the next command structure in an sctp_cmd_seq. 240/* Return the next command structure in an sctp_cmd_seq.
241 * Return NULL at the end of the sequence. 241 * Return NULL at the end of the sequence.
242 */ 242 */
243static inline sctp_cmd_t *sctp_next_cmd(sctp_cmd_seq_t *seq) 243static inline struct sctp_cmd *sctp_next_cmd(sctp_cmd_seq_t *seq)
244{ 244{
245 if (seq->next_cmd <= seq->last_used_slot) 245 if (seq->next_cmd <= seq->last_used_slot)
246 return NULL; 246 return NULL;
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index 5e8e41879b03..0cb3d5a723af 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1277,7 +1277,7 @@ static int sctp_cmd_interpreter(enum sctp_event event_type,
1277 struct sctp_sock *sp = sctp_sk(sk); 1277 struct sctp_sock *sp = sctp_sk(sk);
1278 int error = 0; 1278 int error = 0;
1279 int force; 1279 int force;
1280 sctp_cmd_t *cmd; 1280 struct sctp_cmd *cmd;
1281 struct sctp_chunk *new_obj; 1281 struct sctp_chunk *new_obj;
1282 struct sctp_chunk *chunk = NULL; 1282 struct sctp_chunk *chunk = NULL;
1283 struct sctp_packet *packet; 1283 struct sctp_packet *packet;