* [PATCH] usb: gadget: udc: dummy_hcd: mark expected switch fall-throughs
@ 2017-10-25 17:28 Gustavo A. R. Silva
2017-10-26 9:44 ` Felipe Balbi
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-25 17:28 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
drivers/usb/gadget/udc/dummy_hcd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index 664b64e..9dd26ff 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -569,10 +569,12 @@ static int dummy_enable(struct usb_ep *_ep,
if (max <= 1024)
break;
/* save a return statement */
+ /* fall through */
case USB_SPEED_FULL:
if (max <= 64)
break;
/* save a return statement */
+ /* fall through */
default:
if (max <= 8)
break;
@@ -590,6 +592,7 @@ static int dummy_enable(struct usb_ep *_ep,
if (max <= 1024)
break;
/* save a return statement */
+ /* fall through */
case USB_SPEED_FULL:
if (max <= 1023)
break;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: gadget: udc: dummy_hcd: mark expected switch fall-throughs
2017-10-25 17:28 [PATCH] usb: gadget: udc: dummy_hcd: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2017-10-26 9:44 ` Felipe Balbi
0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2017-10-26 9:44 UTC (permalink / raw)
To: Gustavo A. R. Silva, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, Gustavo A. R. Silva
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
"Gustavo A. R. Silva" <garsilva@embeddedor.com> writes:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-26 9:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 17:28 [PATCH] usb: gadget: udc: dummy_hcd: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-26 9:44 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).