aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/command.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2008-03-27 20:54:29 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-27 20:54:29 -0400
commitbc09dff198e67a98a82c42000006b39f6d502031 (patch)
treeb171eba795f04956020cbbe73ce2cc56b58cf34b /net/sctp/command.c
parent419ae74ecc9494e58928a5c6652f4c072f3ca744 (diff)
[SCTP]: Remove sctp_add_cmd_sf wrapper bloat
With a was number of callsites sctp_add_cmd_sf wrapper bloats kernel by some amount. Due to unlikely tracking allyesconfig, with the initial result were around ~7kB (thus caught my attention) while a non-debug config produced only ~2.3kB effect. I (ij) proposed first a patch to uninline it but Vlad responded with a patch that removed the only sctp_add_cmd call which is wrapped by sctp_add_cmd_sf (I wasn't sure if I could do that). I did minor cleanup to Vlad's patch. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/command.c')
-rw-r--r--net/sctp/command.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/sctp/command.c b/net/sctp/command.c
index bb977330002a..c0044019db9e 100644
--- a/net/sctp/command.c
+++ b/net/sctp/command.c
@@ -52,18 +52,12 @@ int sctp_init_cmd_seq(sctp_cmd_seq_t *seq)
52/* Add a command to a sctp_cmd_seq_t. 52/* Add a command to a sctp_cmd_seq_t.
53 * Return 0 if the command sequence is full. 53 * Return 0 if the command sequence is full.
54 */ 54 */
55int sctp_add_cmd(sctp_cmd_seq_t *seq, sctp_verb_t verb, sctp_arg_t obj) 55void sctp_add_cmd_sf(sctp_cmd_seq_t *seq, sctp_verb_t verb, sctp_arg_t obj)
56{ 56{
57 if (seq->next_free_slot >= SCTP_MAX_NUM_COMMANDS) 57 BUG_ON(seq->next_free_slot >= SCTP_MAX_NUM_COMMANDS);
58 goto fail;
59 58
60 seq->cmds[seq->next_free_slot].verb = verb; 59 seq->cmds[seq->next_free_slot].verb = verb;
61 seq->cmds[seq->next_free_slot++].obj = obj; 60 seq->cmds[seq->next_free_slot++].obj = obj;
62
63 return 1;
64
65fail:
66 return 0;
67} 61}
68 62
69/* Return the next command structure in a sctp_cmd_seq. 63/* Return the next command structure in a sctp_cmd_seq.