usb: xhci: annotate switch/case fallthrough properly
authorAndre Przywara <andre.przywara@arm.com>
Thu, 27 Mar 2025 15:33:04 +0000 (15:33 +0000)
committerTom Rini <trini@konsulko.com>
Tue, 8 Apr 2025 22:23:51 +0000 (16:23 -0600)
The USB XHCI code uses an implicit switch/case fallthrough to share code
for handling full speed and low speed transfers.

Add our "fallthrough;" statement-like macro before the second label in
the XHCI code, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/usb/host/xhci.c

index d30725d..3ee1f67 100644 (file)
@@ -352,7 +352,7 @@ static unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
                 * since it uses the same rules as low speed interrupt
                 * endpoints.
                 */
-
+               fallthrough;
        case USB_SPEED_LOW:
                if (usb_endpoint_xfer_int(endpt_desc) ||
                    usb_endpoint_xfer_isoc(endpt_desc)) {