Skip to content

Commit cc6328d

Browse files
bwhacksdavem330
authored andcommitted
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>
1 parent e04dae8 commit cc6328d

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

‎net/llc/llc_station.c‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -331,14 +331,6 @@ static int llc_station_ac_report_status(struct sk_buff *skb)
331331
return 0;
332332
}
333333

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-
*/
340-
static struct llc_station_state_trans llc_stat_state_trans_end;
341-
342334
/* DOWN STATE transitions */
343335

344336
/* 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 = {
372364
static struct llc_station_state_trans *llc_stat_dwn_state_trans[] = {
373365
[0] = &llc_stat_down_state_trans_1,
374366
[1] = &llc_stat_down_state_trans_2,
375-
[2] = &llc_stat_state_trans_end,
367+
[2] = NULL,
376368
};
377369

378370
/* UP STATE transitions */
@@ -417,7 +409,7 @@ static struct llc_station_state_trans *llc_stat_up_state_trans [] = {
417409
[0] = &llc_stat_up_state_trans_1,
418410
[1] = &llc_stat_up_state_trans_2,
419411
[2] = &llc_stat_up_state_trans_3,
420-
[3] = &llc_stat_state_trans_end,
412+
[3] = NULL,
421413
};
422414

423415
/* DUP ADDR CHK STATE transitions */
@@ -512,7 +504,7 @@ static struct llc_station_state_trans *llc_stat_dupaddr_state_trans[] = {
512504
[3] = &llc_stat_dupaddr_state_trans_1, /* Receive frame */
513505
[4] = &llc_stat_dupaddr_state_trans_2,
514506
[5] = &llc_stat_dupaddr_state_trans_3,
515-
[6] = &llc_stat_state_trans_end,
507+
[6] = NULL,
516508
};
517509

518510
static struct llc_station_state
@@ -568,7 +560,7 @@ static struct llc_station_state_trans *
568560
struct llc_station_state *curr_state =
569561
&llc_station_state_table[llc_main_station.state - 1];
570562

571-
for (next_trans = curr_state->transitions; next_trans[i]->ev; i++)
563+
for (next_trans = curr_state->transitions; next_trans[i]; i++)
572564
if (!next_trans[i]->ev(skb)) {
573565
rc = next_trans[i];
574566
break;

0 commit comments

Comments
 (0)