Skip to content

Commit 9b10000

Browse files
GustavoARSilvadavem330
authored andcommitted
tg3: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <[email protected]> Acked-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 58c77bf commit 9b10000

File tree

1 file changed

+14
-0
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+14
-0
lines changed

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ static int tg3_ape_lock(struct tg3 *tp, int locknum)
721721
case TG3_APE_LOCK_GPIO:
722722
if (tg3_asic_rev(tp) == ASIC_REV_5761)
723723
return 0;
724+
/* else: fall through */
724725
case TG3_APE_LOCK_GRC:
725726
case TG3_APE_LOCK_MEM:
726727
if (!tp->pci_fn)
@@ -781,6 +782,7 @@ static void tg3_ape_unlock(struct tg3 *tp, int locknum)
781782
case TG3_APE_LOCK_GPIO:
782783
if (tg3_asic_rev(tp) == ASIC_REV_5761)
783784
return;
785+
/* else: fall through */
784786
case TG3_APE_LOCK_GRC:
785787
case TG3_APE_LOCK_MEM:
786788
if (!tp->pci_fn)
@@ -10706,28 +10708,40 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset_phy)
1070610708
switch (limit) {
1070710709
case 16:
1070810710
tw32(MAC_RCV_RULE_15, 0); tw32(MAC_RCV_VALUE_15, 0);
10711+
/* fall through */
1070910712
case 15:
1071010713
tw32(MAC_RCV_RULE_14, 0); tw32(MAC_RCV_VALUE_14, 0);
10714+
/* fall through */
1071110715
case 14:
1071210716
tw32(MAC_RCV_RULE_13, 0); tw32(MAC_RCV_VALUE_13, 0);
10717+
/* fall through */
1071310718
case 13:
1071410719
tw32(MAC_RCV_RULE_12, 0); tw32(MAC_RCV_VALUE_12, 0);
10720+
/* fall through */
1071510721
case 12:
1071610722
tw32(MAC_RCV_RULE_11, 0); tw32(MAC_RCV_VALUE_11, 0);
10723+
/* fall through */
1071710724
case 11:
1071810725
tw32(MAC_RCV_RULE_10, 0); tw32(MAC_RCV_VALUE_10, 0);
10726+
/* fall through */
1071910727
case 10:
1072010728
tw32(MAC_RCV_RULE_9, 0); tw32(MAC_RCV_VALUE_9, 0);
10729+
/* fall through */
1072110730
case 9:
1072210731
tw32(MAC_RCV_RULE_8, 0); tw32(MAC_RCV_VALUE_8, 0);
10732+
/* fall through */
1072310733
case 8:
1072410734
tw32(MAC_RCV_RULE_7, 0); tw32(MAC_RCV_VALUE_7, 0);
10735+
/* fall through */
1072510736
case 7:
1072610737
tw32(MAC_RCV_RULE_6, 0); tw32(MAC_RCV_VALUE_6, 0);
10738+
/* fall through */
1072710739
case 6:
1072810740
tw32(MAC_RCV_RULE_5, 0); tw32(MAC_RCV_VALUE_5, 0);
10741+
/* fall through */
1072910742
case 5:
1073010743
tw32(MAC_RCV_RULE_4, 0); tw32(MAC_RCV_VALUE_4, 0);
10744+
/* fall through */
1073110745
case 4:
1073210746
/* tw32(MAC_RCV_RULE_3, 0); tw32(MAC_RCV_VALUE_3, 0); */
1073310747
case 3:

0 commit comments

Comments
 (0)