Skip to content

Commit

Permalink
usb: host: fhci-hcd: annotate PIPE_CONTROL switch case with fallthrough
Browse files Browse the repository at this point in the history
After this was made buildable for something other than PPC32, kbuild
starts warning

drivers/usb/host/fhci-hcd.c:398:8: warning: this statement may fall
through [-Wimplicit-fallthrough=]

I don't know this code, but from the construction (initializing size
with 0 and explicitly using "size +=" in the PIPE_BULK case) I assume
that fallthrough is indeed intended.

Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Rasmus Villemoes <[email protected]>
Acked-by: Li Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Villemoes authored and gregkh committed Feb 19, 2020
1 parent 57a5e5f commit 2892699
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/host/fhci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ static int fhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
case PIPE_CONTROL:
/* 1 td fro setup,1 for ack */
size = 2;
fallthrough;
case PIPE_BULK:
/* one td for every 4096 bytes(can be up to 8k) */
size += urb->transfer_buffer_length / 4096;
Expand Down

0 comments on commit 2892699

Please sign in to comment.