]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
igb_main: Mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 7 Aug 2018 23:22:22 +0000 (18:22 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Aug 2018 00:54:20 +0000 (17:54 -0700)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 200521 ("Missing break in switch")
Addresses-Coverity-ID: 114797 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/igb/igb_main.c

index 25720d95d4ea36110db7353bda8528385bb09823..221a735dc95604dfa661cbef5ed266c458696084 100644 (file)
@@ -5176,6 +5176,7 @@ bool igb_has_link(struct igb_adapter *adapter)
        case e1000_media_type_copper:
                if (!hw->mac.get_link_status)
                        return true;
+               /* fall through */
        case e1000_media_type_internal_serdes:
                hw->mac.ops.check_for_link(hw);
                link_active = !hw->mac.get_link_status;
@@ -5836,6 +5837,7 @@ static void igb_tx_csum(struct igb_ring *tx_ring, struct igb_tx_buffer *first)
                        type_tucmd = E1000_ADVTXD_TUCMD_L4T_SCTP;
                        break;
                }
+               /* fall through */
        default:
                skb_checksum_help(skb);
                goto csum_failed;