diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2020-07-07 12:15:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-10 08:55:18 +0200 |
commit | a74005ab91856276ca5e424a239ebe73347079d8 (patch) | |
tree | 380c55863a28f9856f67371dea48a6b519291cfe /drivers/usb/gadget/composite.c | |
parent | 8b84724e9e8445f26fb2f7ccb86f8109ba2427c6 (diff) |
usb: gadget: Use fallthrough pseudo-keyword
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/20200707171500.GA13620@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/composite.c')
-rw-r--r-- | drivers/usb/gadget/composite.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 8fbf73467fef..05b176c82cc5 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -72,17 +72,17 @@ function_descriptors(struct usb_function *f, descriptors = f->ssp_descriptors; if (descriptors) break; - /* FALLTHROUGH */ + fallthrough; case USB_SPEED_SUPER: descriptors = f->ss_descriptors; if (descriptors) break; - /* FALLTHROUGH */ + fallthrough; case USB_SPEED_HIGH: descriptors = f->hs_descriptors; if (descriptors) break; - /* FALLTHROUGH */ + fallthrough; default: descriptors = f->fs_descriptors; } @@ -170,20 +170,20 @@ int config_ep_by_speed_and_alt(struct usb_gadget *g, want_comp_desc = 1; break; } - /* fall through */ + fallthrough; case USB_SPEED_SUPER: if (gadget_is_superspeed(g)) { speed_desc = f->ss_descriptors; want_comp_desc = 1; break; } - /* fall through */ + fallthrough; case USB_SPEED_HIGH: if (gadget_is_dualspeed(g)) { speed_desc = f->hs_descriptors; break; } - /* fall through */ + fallthrough; default: speed_desc = f->fs_descriptors; } @@ -237,7 +237,7 @@ ep_found: case USB_ENDPOINT_XFER_ISOC: /* mult: bits 1:0 of bmAttributes */ _ep->mult = (comp_desc->bmAttributes & 0x3) + 1; - /* fall through */ + fallthrough; case USB_ENDPOINT_XFER_BULK: case USB_ENDPOINT_XFER_INT: _ep->maxburst = comp_desc->bMaxBurst + 1; @@ -1697,7 +1697,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) if (!gadget_is_dualspeed(gadget) || gadget->speed >= USB_SPEED_SUPER) break; - /* FALLTHROUGH */ + fallthrough; case USB_DT_CONFIG: value = config_desc(cdev, w_value); if (value >= 0) |