From: Gustavo A. R. Silva Date: Wed, 1 May 2019 15:39:34 +0000 (-0500) Subject: usb: isp1760-hcd: Fix fall-through annotations X-Git-Tag: v5.4-rc1~1055^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce64cea47cc4a16a8e55150a255254c0402ba3f5;p=platform%2Fkernel%2Flinux-rpi.git usb: isp1760-hcd: Fix fall-through annotations In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/usb/isp1760/isp1760-hcd.c: In function ‘collect_qtds’: drivers/usb/isp1760/isp1760-hcd.c:788:6: warning: this statement may fall through [-Wimplicit-fallthrough=] mem_reads8(hcd->regs, qtd->payload_addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ qtd->data_buffer, ~~~~~~~~~~~~~~~~~ qtd->actual_length); ~~~~~~~~~~~~~~~~~~~ drivers/usb/isp1760/isp1760-hcd.c:792:5: note: here case OUT_PID: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 Notice that, in this particular case, the code comments are modified in accordance with what GCC is expecting to find. This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c index 8142c6b..320fc47 100644 --- a/drivers/usb/isp1760/isp1760-hcd.c +++ b/drivers/usb/isp1760/isp1760-hcd.c @@ -788,11 +788,11 @@ static void collect_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh, mem_reads8(hcd->regs, qtd->payload_addr, qtd->data_buffer, qtd->actual_length); - /* Fall through (?) */ + /* Fall through */ case OUT_PID: qtd->urb->actual_length += qtd->actual_length; - /* Fall through ... */ + /* Fall through */ case SETUP_PID: break; }