net: usb: Mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Thu, 28 Jun 2018 18:50:48 +0000 (13:50 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 11:47:16 +0000 (20:47 +0900)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/catc.c
drivers/net/usb/cdc-phonet.c
drivers/net/usb/r8152.c

index 18d36dff97ea64d623547ebd0ceb3222bfa70163..424053bd8b21bdd000b1432d7f3d9425fbc2be09 100644 (file)
@@ -869,6 +869,7 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
                default:
                        dev_warn(&intf->dev,
                                 "Couldn't detect memory size, assuming 32k\n");
+                       /* fall through */
                case 0x87654321:
                        catc_set_reg(catc, TxBufCount, 4);
                        catc_set_reg(catc, RxBufCount, 16);
index 3c40312fa453882005cb178933774cbd82a0825d..78b16eb9e58c8ddb93e35ed965f00b1f173f3804 100644 (file)
@@ -110,6 +110,7 @@ static void tx_complete(struct urb *req)
        case -ECONNRESET:
        case -ESHUTDOWN:
                dev->stats.tx_aborted_errors++;
+               /* fall through */
        default:
                dev->stats.tx_errors++;
                dev_dbg(&dev->dev, "TX error (%d)\n", status);
index c08c0d633407d29f3ab4a2da5c26b3e87d9676da..a3e06a8bf9c6ccf709a0cc6fa5c3387a6a16319e 100644 (file)
@@ -1376,6 +1376,7 @@ static void intr_callback(struct urb *urb)
        case -ECONNRESET:       /* unlink */
        case -ESHUTDOWN:
                netif_device_detach(tp->netdev);
+               /* fall through */
        case -ENOENT:
        case -EPROTO:
                netif_info(tp, intr, tp->netdev,
@@ -2741,6 +2742,7 @@ static void r8153b_ups_en(struct r8152 *tp, bool enable)
                        r8152_mdio_write(tp, MII_BMCR, data);
 
                        data = r8153_phy_status(tp, PHY_STAT_LAN_ON);
+                       /* fall through */
 
                default:
                        if (data != PHY_STAT_LAN_ON)