]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
igb: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 5 Mar 2021 09:05:11 +0000 (03:05 -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/igb/e1000_phy.c
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_ptp.c

index 8c8eb82e6272469b53982555f27e11307243b687..a018000f7db92e42cae91bf6f807400a794d3367 100644 (file)
@@ -836,6 +836,7 @@ s32 igb_copper_link_setup_igp(struct e1000_hw *hw)
                        break;
                case e1000_ms_auto:
                        data &= ~CR_1000T_MS_ENABLE;
+                       break;
                default:
                        break;
                }
index 4ab9f468f08edb9009d0d0bd715e6b3aa6b3477d..7545da216d8bc9c4003356857a0d4f1327e54579 100644 (file)
@@ -3010,6 +3010,7 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
                break;
        case ETHTOOL_SRXCLSRLDEL:
                ret = igb_del_ethtool_nfc_entry(adapter, cmd);
+               break;
        default:
                break;
        }
index 7cc5428c3b3d2562034ffa54da740acd3234dec9..f3ff565da0a1229badb6d9c70cd14352157527d1 100644 (file)
@@ -1008,6 +1008,7 @@ static int igb_ptp_set_timestamp_mode(struct igb_adapter *adapter,
        switch (config->tx_type) {
        case HWTSTAMP_TX_OFF:
                tsync_tx_ctl = 0;
+               break;
        case HWTSTAMP_TX_ON:
                break;
        default: