diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2020-07-07 22:56:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-10 09:55:17 +0300 |
commit | 0d9b6d49fe39bd397f1d5913b1bfb8c4fdef0255 (patch) | |
tree | 683bc21e3a642e329292cd1cace5f455f7b7fca6 /drivers/usb/core | |
parent | 4e71e079432e3e0c8572a405f5cedf957d4d422c (diff) | |
download | linux-0d9b6d49fe39bd397f1d5913b1bfb8c4fdef0255.tar.xz |
usb: 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/20200707195607.GA4198@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/config.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 8 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/urb.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 37442f423a41..562a730befda 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -427,7 +427,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, i = maxp & (BIT(12) | BIT(11)); maxp &= ~i; } - /* fallthrough */ + fallthrough; default: maxpacket_maxes = high_speed_maxpacket_maxes; break; diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index de624c47e190..a33b849e8beb 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -564,7 +564,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) case DeviceRequest | USB_REQ_GET_CONFIGURATION: tbuf[0] = 1; len = 1; - /* FALLTHROUGH */ + fallthrough; case DeviceOutRequest | USB_REQ_SET_CONFIGURATION: break; case DeviceRequest | USB_REQ_GET_DESCRIPTOR: @@ -633,7 +633,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) case DeviceRequest | USB_REQ_GET_INTERFACE: tbuf[0] = 0; len = 1; - /* FALLTHROUGH */ + fallthrough; case DeviceOutRequest | USB_REQ_SET_INTERFACE: break; case DeviceOutRequest | USB_REQ_SET_ADDRESS: @@ -651,7 +651,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) tbuf[0] = 0; tbuf[1] = 0; len = 2; - /* FALLTHROUGH */ + fallthrough; case EndpointOutRequest | USB_REQ_CLEAR_FEATURE: case EndpointOutRequest | USB_REQ_SET_FEATURE: dev_dbg (hcd->self.controller, "no endpoint features yet\n"); @@ -2726,7 +2726,7 @@ int usb_add_hcd(struct usb_hcd *hcd, case HCD_USB32: rhdev->rx_lanes = 2; rhdev->tx_lanes = 2; - /* fall through */ + fallthrough; case HCD_USB31: rhdev->speed = USB_SPEED_SUPER_PLUS; break; diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 71bbd2eed7c6..052d5accfe9b 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4698,7 +4698,7 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, r = 0; break; } - /* FALL THROUGH */ + fallthrough; default: if (r == 0) r = -EPROTO; diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index da923ec17612..7bc23469f4e4 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -486,7 +486,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) case USB_ENDPOINT_XFER_INT: if (is_out) allowed |= URB_ZERO_PACKET; - /* FALLTHROUGH */ + fallthrough; default: /* all non-iso endpoints */ if (!is_out) allowed |= URB_SHORT_NOT_OK; @@ -519,7 +519,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) if ((urb->interval < 6) && (xfertype == USB_ENDPOINT_XFER_INT)) return -EINVAL; - /* fall through */ + fallthrough; default: if (urb->interval <= 0) return -EINVAL; |