USB: OHCI: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 7 Jul 2020 19:53:51 +0000 (14:53 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jul 2020 06:55:18 +0000 (08:55 +0200)
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200707195351.GA4061@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hub.c
drivers/usb/host/ohci-q.c
drivers/usb/host/ohci-tmio.c

index 4de91653a2c7bbd9b4b92935f92a4db7a4aeb370..9b4121927d4af129b61765b9f77b5e6c7aa5b05f 100644 (file)
@@ -385,7 +385,7 @@ sanitize:
                        ed_free (ohci, ed);
                        break;
                }
-               /* fall through */
+               fallthrough;
        default:
                /* caller was supposed to have unlinked any requests;
                 * that's not our job.  can't recover; must leak ed.
@@ -1051,7 +1051,7 @@ int ohci_restart(struct ohci_hcd *ohci)
                        ed->ed_next = ohci->ed_rm_list;
                        ed->ed_prev = NULL;
                        ohci->ed_rm_list = ed;
-                       /* FALLTHROUGH */
+                       fallthrough;
                case ED_UNLINK:
                        break;
                default:
index 634f3c7bf7748085758635ffe86108c948e0d08e..44504c1751e0450e309abb1338cc97df0556f26d 100644 (file)
@@ -58,7 +58,7 @@ __acquires(ohci->lock)
                ohci->hc_control |= OHCI_USB_RESET;
                ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
                (void) ohci_readl (ohci, &ohci->regs->control);
-               /* FALL THROUGH */
+               fallthrough;
        case OHCI_USB_RESET:
                status = -EBUSY;
                ohci_dbg (ohci, "needs reinit!\n");
index 4ccb85a67bb3c65bcf3d12e393e0838d4e30ada1..3b445312beea3a80ffff90db00179b3079abe00d 100644 (file)
@@ -647,7 +647,7 @@ static void td_submit_urb (
                /* ... and periodic urbs have extra accounting */
                periodic = ohci_to_hcd(ohci)->self.bandwidth_int_reqs++ == 0
                        && ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0;
-               /* FALLTHROUGH */
+               fallthrough;
        case PIPE_BULK:
                info = is_out
                        ? TD_T_TOGGLE | TD_CC | TD_DP_OUT
@@ -879,11 +879,11 @@ static void ed_halted(struct ohci_hcd *ohci, struct td *td, int cc)
        case TD_DATAUNDERRUN:
                if ((urb->transfer_flags & URB_SHORT_NOT_OK) == 0)
                        break;
-               /* fallthrough */
+               fallthrough;
        case TD_CC_STALL:
                if (usb_pipecontrol (urb->pipe))
                        break;
-               /* fallthrough */
+               fallthrough;
        default:
                ohci_dbg (ohci,
                        "urb %p path %s ep%d%s %08x cc %d --> status %d\n",
index fb6f5e9ae5c620e54aa85c2542339314f634d10e..7f857bad9e95bd5382375e4dafcec00065db567a 100644 (file)
@@ -97,13 +97,13 @@ static void tmio_stop_hc(struct platform_device *dev)
        switch (ohci->num_ports) {
                default:
                        dev_err(&dev->dev, "Unsupported amount of ports: %d\n", ohci->num_ports);
-                       /* fall through */
+                       fallthrough;
                case 3:
                        pm |= CCR_PM_USBPW3;
-                       /* fall through */
+                       fallthrough;
                case 2:
                        pm |= CCR_PM_USBPW2;
-                       /* fall through */
+                       fallthrough;
                case 1:
                        pm |= CCR_PM_USBPW1;
        }