diff options
| author | Sridhar Samudrala <sri@us.ibm.com> | 2004-12-26 18:51:01 -0800 |
|---|---|---|
| committer | Sridhar Samudrala <sri@us.ibm.com> | 2004-12-26 18:51:01 -0800 |
| commit | 3da25caccc4e293aada9c1f7130a98be64907c77 (patch) | |
| tree | 758a789fdc0b72c7081331756d1c8f209f661cfb /net/sctp/sm_sideeffect.c | |
| parent | feca988507f3e9b5cc27051197e890d9bbadc513 (diff) | |
[SCTP] Code cleanup: remove unused code and make needlessly global code static
Signed-off-by: Adrian Bunk <bunk@stutsa.de>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Diffstat (limited to 'net/sctp/sm_sideeffect.c')
| -rw-r--r-- | net/sctp/sm_sideeffect.c | 66 |
1 files changed, 44 insertions, 22 deletions
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index c9705de466bc..b5d983cc05d0 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c @@ -55,6 +55,24 @@ #include <net/sctp/sctp.h> #include <net/sctp/sm.h> +static int sctp_cmd_interpreter(sctp_event_t event_type, + sctp_subtype_t subtype, + sctp_state_t state, + struct sctp_endpoint *ep, + struct sctp_association *asoc, + void *event_arg, + sctp_disposition_t status, + sctp_cmd_seq_t *commands, + int gfp); +static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, + sctp_state_t state, + struct sctp_endpoint *ep, + struct sctp_association *asoc, + void *event_arg, + sctp_disposition_t status, + sctp_cmd_seq_t *commands, + int gfp); + /******************************************************************** * Helper functions ********************************************************************/ @@ -134,8 +152,8 @@ static void sctp_do_ecn_cwr_work(struct sctp_association *asoc, } /* Generate SACK if necessary. We call this at the end of a packet. */ -int sctp_gen_sack(struct sctp_association *asoc, int force, - sctp_cmd_seq_t *commands) +static int sctp_gen_sack(struct sctp_association *asoc, int force, + sctp_cmd_seq_t *commands) { __u32 ctsn, max_tsn_seen; struct sctp_chunk *sack; @@ -276,31 +294,31 @@ out_unlock: sctp_association_put(asoc); } -void sctp_generate_t1_cookie_event(unsigned long data) +static void sctp_generate_t1_cookie_event(unsigned long data) { struct sctp_association *asoc = (struct sctp_association *) data; sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T1_COOKIE); } -void sctp_generate_t1_init_event(unsigned long data) +static void sctp_generate_t1_init_event(unsigned long data) { struct sctp_association *asoc = (struct sctp_association *) data; sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T1_INIT); } -void sctp_generate_t2_shutdown_event(unsigned long data) +static void sctp_generate_t2_shutdown_event(unsigned long data) { struct sctp_association *asoc = (struct sctp_association *) data; sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T2_SHUTDOWN); } -void sctp_generate_t4_rto_event(unsigned long data) +static void sctp_generate_t4_rto_event(unsigned long data) { struct sctp_association *asoc = (struct sctp_association *) data; sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T4_RTO); } -void sctp_generate_t5_shutdown_guard_event(unsigned long data) +static void sctp_generate_t5_shutdown_guard_event(unsigned long data) { struct sctp_association *asoc = (struct sctp_association *)data; sctp_generate_timeout_event(asoc, @@ -308,7 +326,7 @@ void sctp_generate_t5_shutdown_guard_event(unsigned long data) } /* sctp_generate_t5_shutdown_guard_event() */ -void sctp_generate_autoclose_event(unsigned long data) +static void sctp_generate_autoclose_event(unsigned long data) { struct sctp_association *asoc = (struct sctp_association *) data; sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_AUTOCLOSE); @@ -353,7 +371,7 @@ out_unlock: } /* Inject a SACK Timeout event into the state machine. */ -void sctp_generate_sack_event(unsigned long data) +static void sctp_generate_sack_event(unsigned long data) { struct sctp_association *asoc = (struct sctp_association *) data; sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_SACK); @@ -857,14 +875,14 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype, /***************************************************************** * This the master state function side effect processing function. *****************************************************************/ -int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, - sctp_state_t state, - struct sctp_endpoint *ep, - struct sctp_association *asoc, - void *event_arg, - sctp_disposition_t status, - sctp_cmd_seq_t *commands, - int gfp) +static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype, + sctp_state_t state, + struct sctp_endpoint *ep, + struct sctp_association *asoc, + void *event_arg, + sctp_disposition_t status, + sctp_cmd_seq_t *commands, + int gfp) { int error; @@ -944,11 +962,15 @@ bail: ********************************************************************/ /* This is the side-effect interpreter. */ -int sctp_cmd_interpreter(sctp_event_t event_type, sctp_subtype_t subtype, - sctp_state_t state, struct sctp_endpoint *ep, - struct sctp_association *asoc, void *event_arg, - sctp_disposition_t status, sctp_cmd_seq_t *commands, - int gfp) +static int sctp_cmd_interpreter(sctp_event_t event_type, + sctp_subtype_t subtype, + sctp_state_t state, + struct sctp_endpoint *ep, + struct sctp_association *asoc, + void *event_arg, + sctp_disposition_t status, + sctp_cmd_seq_t *commands, + int gfp) { int error = 0; int force; |
