usbip: 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>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200707195214.GA3932@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Gustavo A. R. Silva 2020-07-07 14:52:14 -05:00 committed by Greg Kroah-Hartman
parent ec326c9d05
commit 2da3b53c78
4 changed files with 7 additions and 8 deletions

View File

@ -424,7 +424,7 @@ static void masking_bogus_flags(struct urb *urb)
case USB_ENDPOINT_XFER_BULK: case USB_ENDPOINT_XFER_BULK:
if (is_out) if (is_out)
allowed |= URB_ZERO_PACKET; allowed |= URB_ZERO_PACKET;
/* FALLTHROUGH */ fallthrough;
default: /* all non-iso endpoints */ default: /* all non-iso endpoints */
if (!is_out) if (!is_out)
allowed |= URB_SHORT_NOT_OK; allowed |= URB_SHORT_NOT_OK;

View File

@ -508,7 +508,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
case USB_PORT_FEAT_U1_TIMEOUT: case USB_PORT_FEAT_U1_TIMEOUT:
usbip_dbg_vhci_rh( usbip_dbg_vhci_rh(
" SetPortFeature: USB_PORT_FEAT_U1_TIMEOUT\n"); " SetPortFeature: USB_PORT_FEAT_U1_TIMEOUT\n");
/* Fall through */ fallthrough;
case USB_PORT_FEAT_U2_TIMEOUT: case USB_PORT_FEAT_U2_TIMEOUT:
usbip_dbg_vhci_rh( usbip_dbg_vhci_rh(
" SetPortFeature: USB_PORT_FEAT_U2_TIMEOUT\n"); " SetPortFeature: USB_PORT_FEAT_U2_TIMEOUT\n");
@ -561,7 +561,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
"supported for USB 2.0 roothub\n"); "supported for USB 2.0 roothub\n");
goto error; goto error;
} }
/* FALLS THROUGH */ fallthrough;
case USB_PORT_FEAT_RESET: case USB_PORT_FEAT_RESET:
usbip_dbg_vhci_rh( usbip_dbg_vhci_rh(
" SetPortFeature: USB_PORT_FEAT_RESET\n"); " SetPortFeature: USB_PORT_FEAT_RESET\n");
@ -584,8 +584,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
/* 50msec reset signaling */ /* 50msec reset signaling */
vhci_hcd->re_timeout = jiffies + msecs_to_jiffies(50); vhci_hcd->re_timeout = jiffies + msecs_to_jiffies(50);
fallthrough;
/* FALLS THROUGH */
default: default:
usbip_dbg_vhci_rh(" SetPortFeature: default %d\n", usbip_dbg_vhci_rh(" SetPortFeature: default %d\n",
wValue); wValue);

View File

@ -27,7 +27,7 @@ struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum)
switch (status) { switch (status) {
case -ENOENT: case -ENOENT:
/* fall through */ fallthrough;
case -ECONNRESET: case -ECONNRESET:
dev_dbg(&urb->dev->dev, dev_dbg(&urb->dev->dev,
"urb seq# %u was unlinked %ssynchronously\n", "urb seq# %u was unlinked %ssynchronously\n",

View File

@ -404,7 +404,7 @@ restart:
* for now, give unlimited bandwidth * for now, give unlimited bandwidth
*/ */
limit += urb->transfer_buffer_length; limit += urb->transfer_buffer_length;
/* fallthrough */ fallthrough;
default: default:
treat_control_like_bulk: treat_control_like_bulk:
total -= transfer(udc, urb, ep, limit); total -= transfer(udc, urb, ep, limit);
@ -479,7 +479,7 @@ void v_kick_timer(struct vudc *udc, unsigned long time)
return; return;
case VUDC_TR_IDLE: case VUDC_TR_IDLE:
t->state = VUDC_TR_RUNNING; t->state = VUDC_TR_RUNNING;
/* fallthrough */ fallthrough;
case VUDC_TR_STOPPED: case VUDC_TR_STOPPED:
/* we may want to kick timer to unqueue urbs */ /* we may want to kick timer to unqueue urbs */
mod_timer(&t->timer, time); mod_timer(&t->timer, time);