]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Resolve warnings for -Wimplicit-fallthrough
authorTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 31 May 2017 11:43:47 +0000 (04:43 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 16 Jun 2017 06:01:24 +0000 (23:01 -0700)
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 <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26242766
(cherry picked from commit 93df9465c93e634c49f18271218076ab0b9aaf75)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

index 30535e6b68f08c9fc4df2988b0316de5c91e2fcf..c9d378531ecdc43b652e84f09c08871e348844f0 100644 (file)
@@ -1589,15 +1589,17 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
 
        switch (ntohs(input_mask->formatted.vlan_id) & 0xEFFF) {
        case 0x0000:
-               /* mask VLAN ID, fall through to mask VLAN priority */
+               /* mask VLAN ID */
                fdirm |= IXGBE_FDIRM_VLANID;
+               /* fall through */
        case 0x0FFF:
                /* mask VLAN priority */
                fdirm |= IXGBE_FDIRM_VLANP;
                break;
        case 0xE000:
-               /* mask VLAN ID only, fall through */
+               /* mask VLAN ID only */
                fdirm |= IXGBE_FDIRM_VLANID;
+               /* fall through */
        case 0xEFFF:
                /* no VLAN fields masked */
                break;
@@ -1608,8 +1610,9 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
 
        switch (input_mask->formatted.flex_bytes & 0xFFFF) {
        case 0x0000:
-               /* Mask Flex Bytes, fall through */
+               /* Mask Flex Bytes */
                fdirm |= IXGBE_FDIRM_FLEX;
+               /* fall through */
        case 0xFFFF:
                break;
        default:
index e8010690796f85c3daed69ca24806d0ee85c30a6..40eddb142345c63ee9b91ee923fd4fdddce98f86 100644 (file)
@@ -155,7 +155,7 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw)
                if (ret_val)
                        return ret_val;
 
-               /* only backplane uses autoc so fall though */
+               /* fall through - only backplane uses autoc */
        case ixgbe_media_type_fiber:
                reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA);
 
@@ -3549,7 +3549,7 @@ void ixgbe_set_rxpba_generic(struct ixgbe_hw *hw,
                rxpktsize <<= IXGBE_RXPBSIZE_SHIFT;
                for (; i < (num_pb / 2); i++)
                        IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize);
-               /* Fall through to configure remaining packet buffers */
+               /* fall through - configure remaining packet buffers */
        case (PBA_STRATEGY_EQUAL):
                /* Divide the remaining Rx packet buffer evenly among the TCs */
                rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT;
index 2627a99e6dce772d84c83d79f340a14c29484451..6e14e197a50d208760a1ccd7f5d72df5f9d7803d 100644 (file)
@@ -2630,6 +2630,7 @@ static int ixgbe_flowspec_to_flow_type(struct ethtool_rx_flow_spec *fsp,
                                *flow_type = IXGBE_ATR_FLOW_TYPE_IPV4;
                                break;
                        }
+                       /* fall through */
                default:
                        return 0;
                }
index 77d3a2bf7e1d0454c05c44862d0f5c4284e37134..a245d3dbe6dcb1bdee9a189a805f3f09afc7efbb 100644 (file)
@@ -1420,7 +1420,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
                                        IXGBE_DCA_CTRL_DCA_MODE_CB2);
                        break;
                }
-               /* Fall Through since DCA is disabled. */
+               /* fall through - DCA is disabled. */
        case DCA_PROVIDER_REMOVE:
                if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
                        dca_remove_requester(dev);
@@ -3966,7 +3966,7 @@ static void ixgbe_setup_rdrxctl(struct ixgbe_adapter *adapter)
        case ixgbe_mac_x550em_a:
                if (adapter->num_vfs)
                        rdrxctl |= IXGBE_RDRXCTL_PSP;
-               /* fall through for older HW */
+               /* fall through */
        case ixgbe_mac_82599EB:
        case ixgbe_mac_X540:
                /* Disable RSC for ACK packets */
@@ -6614,6 +6614,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
                hwstats->o2bspc += IXGBE_READ_REG(hw, IXGBE_O2BSPC);
                hwstats->b2ospc += IXGBE_READ_REG(hw, IXGBE_B2OSPC);
                hwstats->b2ogprc += IXGBE_READ_REG(hw, IXGBE_B2OGPRC);
+               /* fall through */
        case ixgbe_mac_82599EB:
                for (i = 0; i < 16; i++)
                        adapter->hw_rx_no_dma_resources +=
@@ -7956,6 +7957,7 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
 
                if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
                        break;
+               /* fall through */
        default:
                return fallback(dev, skb);
        }
@@ -9039,6 +9041,7 @@ bool ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id,
                        /* only support first port */
                        if (hw->bus.func != 0)
                                break;
+                       /* fall through */
                case IXGBE_SUBDEV_ID_82599_SP_560FLR:
                case IXGBE_SUBDEV_ID_82599_SFP:
                case IXGBE_SUBDEV_ID_82599_RNDC:
index cad61c57849e5566c28191d275cc456e26c71646..3ab127cce981d88bef3a41f0e85954f604bb7088 100644 (file)
@@ -540,16 +540,15 @@ static s32 ixgbe_set_vf_lpe(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
                case ixgbe_mbox_api_11:
                case ixgbe_mbox_api_12:
                case ixgbe_mbox_api_13:
-                       /*
-                        * Version 1.1 supports jumbo frames on VFs if PF has
+                       /* Version 1.1 supports jumbo frames on VFs if PF has
                         * jumbo frames enabled which means legacy VFs are
                         * disabled
                         */
                        if (pf_max_frame > ETH_FRAME_LEN)
                                break;
+                       /* fall through */
                default:
-                       /*
-                        * If the PF or VF are running w/ jumbo frames enabled
+                       /* If the PF or VF are running w/ jumbo frames enabled
                         * we need to shut down the VF Rx path as we cannot
                         * support jumbo frames on legacy VFs
                         */