Skip to contentSkip to conversation

usb: gadget: udc: dummy_hcd: mark expected switch fall-throughs

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Oct 25, 2017 – Oct 26, 2017 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: udc: dummy_hcd: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

---
 drivers/usb/gadget/udc/dummy_hcd.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/gadget/udc/dummy_hcd.c +3 -0
index 664b64e..9dd26ff 100644
@@ -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;
Signature · 1 line
2.7.4