aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-05-01 11:39:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-01 12:13:52 -0400
commitce64cea47cc4a16a8e55150a255254c0402ba3f5 (patch)
tree6b743effd931585db18da60b5f79d5a29d593558
parente823d948b7e53dc982c867ac4ce7877fc0418897 (diff)
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 <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/isp1760/isp1760-hcd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c
index 8142c6b4c4cf..320fc4739835 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,
788 mem_reads8(hcd->regs, qtd->payload_addr, 788 mem_reads8(hcd->regs, qtd->payload_addr,
789 qtd->data_buffer, 789 qtd->data_buffer,
790 qtd->actual_length); 790 qtd->actual_length);
791 /* Fall through (?) */ 791 /* Fall through */
792 case OUT_PID: 792 case OUT_PID:
793 qtd->urb->actual_length += 793 qtd->urb->actual_length +=
794 qtd->actual_length; 794 qtd->actual_length;
795 /* Fall through ... */ 795 /* Fall through */
796 case SETUP_PID: 796 case SETUP_PID:
797 break; 797 break;
798 } 798 }