The "fallthrough" pseudo-keyword was added as a portable way to denote
intentional fallthrough. Clang will still warn on cases where there is a
fallthrough to an immediate break. Add explicit breaks for those cases.
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20201111014716.260633-1-ndesaulniers@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
case USB_PTM_CAP_TYPE:
dev->bos->ptm_cap =
(struct usb_ptm_cap_descriptor *)buffer;
+ break;
default:
break;
}
*/
if (urb->transfer_buffer_length > (16 * 1024))
return -EMSGSIZE;
- /* FALLTHROUGH */
+ fallthrough;
/* case PIPE_BULK: */
default:
if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
/* 1 TD for setup, 1 for ACK, plus ... */
size = 2;
- /* FALLTHROUGH */
+ fallthrough;
// case PIPE_INTERRUPT:
// case PIPE_BULK:
default:
case C_HUB_OVER_CURRENT:
ohci_writel (ohci, RH_HS_OCIC,
&ohci->regs->roothub.status);
+ break;
case C_HUB_LOCAL_POWER:
break;
default:
xhci_warn_ratelimited(xhci,
"WARN Successful completion on short TX for slot %u ep %u: needs XHCI_TRUST_TX_LENGTH quirk?\n",
slot_id, ep_index);
+ break;
case COMP_SHORT_PACKET:
break;
/* Completion codes for endpoint stopped state */
return -EINVAL;
case EP_STATE_HALTED:
xhci_dbg(xhci, "WARN halted endpoint, queueing URB anyway.\n");
+ break;
case EP_STATE_STOPPED:
case EP_STATE_RUNNING:
break;