aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2012-09-15 13:10:52 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-17 13:04:18 -0400
commitcc6328dfe48fbc6ba67a4bb31473aeea429bee26 (patch)
treed63d2d9cbb1a00f490c48a01689e2d5fc6f40318 /net/llc
parente04dae840883ca31cea01e5958c09eee005cf4de (diff)
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')
-rw-r--r--net/llc/llc_station.c16
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)
331 return 0; 331 return 0;
332} 332}
333 333
334/* COMMON STATION STATE transitions */
335
336/* dummy last-transition indicator; common to all state transition groups
337 * last entry for this state
338 * all members are zeros, .bss zeroes it
339 */
340static struct llc_station_state_trans llc_stat_state_trans_end;
341
342/* DOWN STATE transitions */ 334/* DOWN STATE transitions */
343 335
344/* state transition for LLC_STATION_EV_ENABLE_WITH_DUP_ADDR_CHECK event */ 336/* 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 = {
372static struct llc_station_state_trans *llc_stat_dwn_state_trans[] = { 364static struct llc_station_state_trans *llc_stat_dwn_state_trans[] = {
373 [0] = &llc_stat_down_state_trans_1, 365 [0] = &llc_stat_down_state_trans_1,
374 [1] = &llc_stat_down_state_trans_2, 366 [1] = &llc_stat_down_state_trans_2,
375 [2] = &llc_stat_state_trans_end, 367 [2] = NULL,
376}; 368};
377 369
378/* UP STATE transitions */ 370/* UP STATE transitions */
@@ -417,7 +409,7 @@ static struct llc_station_state_trans *llc_stat_up_state_trans [] = {
417 [0] = &llc_stat_up_state_trans_1, 409 [0] = &llc_stat_up_state_trans_1,
418 [1] = &llc_stat_up_state_trans_2, 410 [1] = &llc_stat_up_state_trans_2,
419 [2] = &llc_stat_up_state_trans_3, 411 [2] = &llc_stat_up_state_trans_3,
420 [3] = &llc_stat_state_trans_end, 412 [3] = NULL,
421}; 413};
422 414
423/* DUP ADDR CHK STATE transitions */ 415/* DUP ADDR CHK STATE transitions */
@@ -512,7 +504,7 @@ static struct llc_station_state_trans *llc_stat_dupaddr_state_trans[] = {
512 [3] = &llc_stat_dupaddr_state_trans_1, /* Receive frame */ 504 [3] = &llc_stat_dupaddr_state_trans_1, /* Receive frame */
513 [4] = &llc_stat_dupaddr_state_trans_2, 505 [4] = &llc_stat_dupaddr_state_trans_2,
514 [5] = &llc_stat_dupaddr_state_trans_3, 506 [5] = &llc_stat_dupaddr_state_trans_3,
515 [6] = &llc_stat_state_trans_end, 507 [6] = NULL,
516}; 508};
517 509
518static struct llc_station_state 510static struct llc_station_state
@@ -568,7 +560,7 @@ static struct llc_station_state_trans *
568 struct llc_station_state *curr_state = 560 struct llc_station_state *curr_state =
569 &llc_station_state_table[llc_main_station.state - 1]; 561 &llc_station_state_table[llc_main_station.state - 1];
570 562
571 for (next_trans = curr_state->transitions; next_trans[i]->ev; i++) 563 for (next_trans = curr_state->transitions; next_trans[i]; i++)
572 if (!next_trans[i]->ev(skb)) { 564 if (!next_trans[i]->ev(skb)) {
573 rc = next_trans[i]; 565 rc = next_trans[i];
574 break; 566 break;