* [PATCH] usb: gadget: composite: mark expected switch fall-throughs
@ 2017-10-25 17:22 Gustavo A. R. Silva
2017-10-26 9:45 ` Felipe Balbi
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-25 17:22 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/composite.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 5d061b3..1f1ab6f 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -170,20 +170,20 @@ int config_ep_by_speed(struct usb_gadget *g,
want_comp_desc = 1;
break;
}
- /* else: Fall trough */
+ /* fall through */
case USB_SPEED_SUPER:
if (gadget_is_superspeed(g)) {
speed_desc = f->ss_descriptors;
want_comp_desc = 1;
break;
}
- /* else: Fall trough */
+ /* fall through */
case USB_SPEED_HIGH:
if (gadget_is_dualspeed(g)) {
speed_desc = f->hs_descriptors;
break;
}
- /* else: fall through */
+ /* fall through */
default:
speed_desc = f->fs_descriptors;
}
@@ -224,6 +224,7 @@ int config_ep_by_speed(struct usb_gadget *g,
case USB_ENDPOINT_XFER_ISOC:
/* mult: bits 1:0 of bmAttributes */
_ep->mult = (comp_desc->bmAttributes & 0x3) + 1;
+ /* fall through */
case USB_ENDPOINT_XFER_BULK:
case USB_ENDPOINT_XFER_INT:
_ep->maxburst = comp_desc->bMaxBurst + 1;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: gadget: composite: mark expected switch fall-throughs
2017-10-25 17:22 [PATCH] usb: gadget: composite: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2017-10-26 9:45 ` Felipe Balbi
2017-10-26 10:45 ` Gustavo A. R. Silva
0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2017-10-26 9:45 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] 3+ messages in thread
* Re: [PATCH] usb: gadget: composite: mark expected switch fall-throughs
2017-10-26 9:45 ` Felipe Balbi
@ 2017-10-26 10:45 ` Gustavo A. R. Silva
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-26 10:45 UTC (permalink / raw)
To: Felipe Balbi; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel
Hi Felipe,
Quoting Felipe Balbi <balbi@kernel.org>:
> "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>
>
Thank you for the ACKs.
--
Gustavo A. R. Silva
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-26 10:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 17:22 [PATCH] usb: gadget: composite: mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-26 9:45 ` Felipe Balbi
2017-10-26 10:45 ` Gustavo A. R. Silva
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.