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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8b84724e9e
commit
a74005ab91
@@ -285,7 +285,7 @@ static void rx_complete(struct usb_ep *ep, struct usb_request *req)
|
||||
|
||||
/* data overrun */
|
||||
case -EOVERFLOW:
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
|
||||
default:
|
||||
DBG(dev, "rx status %d\n", status);
|
||||
@@ -304,7 +304,7 @@ static void tx_complete(struct usb_ep *ep, struct usb_request *req)
|
||||
switch (req->status) {
|
||||
default:
|
||||
VDBG(dev, "tx err %d\n", req->status);
|
||||
/* FALLTHROUGH */
|
||||
fallthrough;
|
||||
case -ECONNRESET: /* unlink */
|
||||
case -ESHUTDOWN: /* disconnect etc */
|
||||
break;
|
||||
@@ -919,7 +919,7 @@ static bool gprinter_req_match(struct usb_function *f,
|
||||
if (!w_value && !w_length &&
|
||||
!(USB_DIR_IN & ctrl->bRequestType))
|
||||
break;
|
||||
/* fall through */
|
||||
fallthrough;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user