Skip to content

Commit 93df946

Browse files
anguy11Jeff Kirsher
authored andcommitted
ixgbe: Resolve warnings for -Wimplicit-fallthrough
This patch adds/changes fall through comments to address new warnings produced by gcc 7. Fixed formatting on a couple of comments in the function. Signed-off-by: Tony Nguyen <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent e61e4c8 commit 93df946

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,15 +1589,17 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
15891589

15901590
switch (ntohs(input_mask->formatted.vlan_id) & 0xEFFF) {
15911591
case 0x0000:
1592-
/* mask VLAN ID, fall through to mask VLAN priority */
1592+
/* mask VLAN ID */
15931593
fdirm |= IXGBE_FDIRM_VLANID;
1594+
/* fall through */
15941595
case 0x0FFF:
15951596
/* mask VLAN priority */
15961597
fdirm |= IXGBE_FDIRM_VLANP;
15971598
break;
15981599
case 0xE000:
1599-
/* mask VLAN ID only, fall through */
1600+
/* mask VLAN ID only */
16001601
fdirm |= IXGBE_FDIRM_VLANID;
1602+
/* fall through */
16011603
case 0xEFFF:
16021604
/* no VLAN fields masked */
16031605
break;
@@ -1608,8 +1610,9 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
16081610

16091611
switch (input_mask->formatted.flex_bytes & 0xFFFF) {
16101612
case 0x0000:
1611-
/* Mask Flex Bytes, fall through */
1613+
/* Mask Flex Bytes */
16121614
fdirm |= IXGBE_FDIRM_FLEX;
1615+
/* fall through */
16131616
case 0xFFFF:
16141617
break;
16151618
default:

drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw)
155155
if (ret_val)
156156
return ret_val;
157157

158-
/* only backplane uses autoc so fall though */
158+
/* fall through - only backplane uses autoc */
159159
case ixgbe_media_type_fiber:
160160
reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA);
161161

@@ -3549,7 +3549,7 @@ void ixgbe_set_rxpba_generic(struct ixgbe_hw *hw,
35493549
rxpktsize <<= IXGBE_RXPBSIZE_SHIFT;
35503550
for (; i < (num_pb / 2); i++)
35513551
IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize);
3552-
/* Fall through to configure remaining packet buffers */
3552+
/* fall through - configure remaining packet buffers */
35533553
case (PBA_STRATEGY_EQUAL):
35543554
/* Divide the remaining Rx packet buffer evenly among the TCs */
35553555
rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT;

drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,6 +2668,7 @@ static int ixgbe_flowspec_to_flow_type(struct ethtool_rx_flow_spec *fsp,
26682668
*flow_type = IXGBE_ATR_FLOW_TYPE_IPV4;
26692669
break;
26702670
}
2671+
/* fall through */
26712672
default:
26722673
return 0;
26732674
}

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
14521452
IXGBE_DCA_CTRL_DCA_MODE_CB2);
14531453
break;
14541454
}
1455-
/* Fall Through since DCA is disabled. */
1455+
/* fall through - DCA is disabled. */
14561456
case DCA_PROVIDER_REMOVE:
14571457
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
14581458
dca_remove_requester(dev);
@@ -2233,6 +2233,7 @@ static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
22332233
break;
22342234
default:
22352235
bpf_warn_invalid_xdp_action(act);
2236+
/* fallthrough */
22362237
case XDP_ABORTED:
22372238
trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
22382239
/* fallthrough -- handle aborts by dropping packet */
@@ -4177,7 +4178,7 @@ static void ixgbe_setup_rdrxctl(struct ixgbe_adapter *adapter)
41774178
case ixgbe_mac_x550em_a:
41784179
if (adapter->num_vfs)
41794180
rdrxctl |= IXGBE_RDRXCTL_PSP;
4180-
/* fall through for older HW */
4181+
/* fall through */
41814182
case ixgbe_mac_82599EB:
41824183
case ixgbe_mac_X540:
41834184
/* Disable RSC for ACK packets */
@@ -6885,6 +6886,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
68856886
hwstats->o2bspc += IXGBE_READ_REG(hw, IXGBE_O2BSPC);
68866887
hwstats->b2ospc += IXGBE_READ_REG(hw, IXGBE_B2OSPC);
68876888
hwstats->b2ogprc += IXGBE_READ_REG(hw, IXGBE_B2OGPRC);
6889+
/* fall through */
68886890
case ixgbe_mac_82599EB:
68896891
for (i = 0; i < 16; i++)
68906892
adapter->hw_rx_no_dma_resources +=
@@ -8207,6 +8209,7 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
82078209

82088210
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
82098211
break;
8212+
/* fall through */
82108213
default:
82118214
return fallback(dev, skb);
82128215
}
@@ -9931,6 +9934,7 @@ bool ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id,
99319934
/* only support first port */
99329935
if (hw->bus.func != 0)
99339936
break;
9937+
/* fall through */
99349938
case IXGBE_SUBDEV_ID_82599_SP_560FLR:
99359939
case IXGBE_SUBDEV_ID_82599_SFP:
99369940
case IXGBE_SUBDEV_ID_82599_RNDC:

drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,16 +540,15 @@ static s32 ixgbe_set_vf_lpe(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
540540
case ixgbe_mbox_api_11:
541541
case ixgbe_mbox_api_12:
542542
case ixgbe_mbox_api_13:
543-
/*
544-
* Version 1.1 supports jumbo frames on VFs if PF has
543+
/* Version 1.1 supports jumbo frames on VFs if PF has
545544
* jumbo frames enabled which means legacy VFs are
546545
* disabled
547546
*/
548547
if (pf_max_frame > ETH_FRAME_LEN)
549548
break;
549+
/* fall through */
550550
default:
551-
/*
552-
* If the PF or VF are running w/ jumbo frames enabled
551+
/* If the PF or VF are running w/ jumbo frames enabled
553552
* we need to shut down the VF Rx path as we cannot
554553
* support jumbo frames on legacy VFs
555554
*/

0 commit comments

Comments
 (0)