diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2012-09-15 19:10:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-17 19:04:18 +0200 |
commit | cc6328dfe48fbc6ba67a4bb31473aeea429bee26 (patch) | |
tree | d63d2d9cbb1a00f490c48a01689e2d5fc6f40318 /net/llc/llc_station.c | |
parent | af_unix: old_cred is surplus (diff) | |
download | linux-cc6328dfe48fbc6ba67a4bb31473aeea429bee26.tar.xz linux-cc6328dfe48fbc6ba67a4bb31473aeea429bee26.zip |
llc2: Remove pointless indirection through llc_stat_state_trans_end
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc/llc_station.c')
-rw-r--r-- | net/llc/llc_station.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c index b2f2bac2c2a2..e16c1b96e527 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c @@ -331,14 +331,6 @@ static int llc_station_ac_report_status(struct sk_buff *skb) return 0; } -/* COMMON STATION STATE transitions */ - -/* dummy last-transition indicator; common to all state transition groups - * last entry for this state - * all members are zeros, .bss zeroes it - */ -static struct llc_station_state_trans llc_stat_state_trans_end; - /* DOWN STATE transitions */ /* state transition for LLC_STATION_EV_ENABLE_WITH_DUP_ADDR_CHECK event */ @@ -372,7 +364,7 @@ static struct llc_station_state_trans llc_stat_down_state_trans_2 = { static struct llc_station_state_trans *llc_stat_dwn_state_trans[] = { [0] = &llc_stat_down_state_trans_1, [1] = &llc_stat_down_state_trans_2, - [2] = &llc_stat_state_trans_end, + [2] = NULL, }; /* UP STATE transitions */ @@ -417,7 +409,7 @@ static struct llc_station_state_trans *llc_stat_up_state_trans [] = { [0] = &llc_stat_up_state_trans_1, [1] = &llc_stat_up_state_trans_2, [2] = &llc_stat_up_state_trans_3, - [3] = &llc_stat_state_trans_end, + [3] = NULL, }; /* DUP ADDR CHK STATE transitions */ @@ -512,7 +504,7 @@ static struct llc_station_state_trans *llc_stat_dupaddr_state_trans[] = { [3] = &llc_stat_dupaddr_state_trans_1, /* Receive frame */ [4] = &llc_stat_dupaddr_state_trans_2, [5] = &llc_stat_dupaddr_state_trans_3, - [6] = &llc_stat_state_trans_end, + [6] = NULL, }; static struct llc_station_state @@ -568,7 +560,7 @@ static struct llc_station_state_trans * struct llc_station_state *curr_state = &llc_station_state_table[llc_main_station.state - 1]; - for (next_trans = curr_state->transitions; next_trans[i]->ev; i++) + for (next_trans = curr_state->transitions; next_trans[i]; i++) if (!next_trans[i]->ev(skb)) { rc = next_trans[i]; break; |