ixgbe: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 5 Mar 2021 09:00:00 +0000 (03:00 -0600)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 23 Mar 2021 18:34:02 +0000 (11:34 -0700)
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of just
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c

index f9a31f1ac7bcbfe6ebfa4506433870cc44493730..e324e42fab2d7469e959e9e730506e0efb08ac99 100644 (file)
@@ -1542,6 +1542,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
        switch (input_mask->formatted.vm_pool & 0x7F) {
        case 0x0:
                fdirm |= IXGBE_FDIRM_POOL;
+               break;
        case 0x7F:
                break;
        default:
@@ -1557,6 +1558,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
                        hw_dbg(hw, " Error on src/dst port mask\n");
                        return IXGBE_ERR_CONFIG;
                }
+               break;
        case IXGBE_ATR_L4TYPE_MASK:
                break;
        default:
index 9521d335ea07dba69559d5b72a4b4f392f37db41..03ccbe6b66d262aa3920b9a939382ee52fc9cfc4 100644 (file)
@@ -93,6 +93,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
                default:
                        break;
                }
+               break;
        default:
                break;
        }
index df389a11d3af6c7a9b551e1f559093dc3120aaee..0218f6c9b9258bcc26f06cf12e1f61123cff72b2 100644 (file)
@@ -132,6 +132,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,
                        else
                                *tx = (tc + 4) << 4;    /* 96, 112 */
                }
+               break;
        default:
                break;
        }
index 22a874eee2e84e08a35ff0ad68987627717a91fa..23ddfd79fc8b675bbc8f00e2933ee3ef7e29b022 100644 (file)
@@ -999,6 +999,7 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,
        switch (config->tx_type) {
        case HWTSTAMP_TX_OFF:
                tsync_tx_ctl = 0;
+               break;
        case HWTSTAMP_TX_ON:
                break;
        default: