Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1576494
| From | Felipe Balbi <balbi@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch |
| Date | 2017-02-08 13:10 +0100 |
| Message-ID | <t8zeq-a8-27@gated-at.bofh.it> (permalink) |
| References | <t8vaO-5So-5@gated-at.bofh.it> <t8wJA-6VL-3@gated-at.bofh.it> <t8y8H-7Ir-45@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi, "Gustavo A. R. Silva" <garsilva@embeddedor.com> writes: >> "Gustavo A. R. Silva" <garsilva@embeddedor.com> writes: >>> Add missing break in switch. >>> >>> Addresses-Coverity-ID: 201385 >>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> >>> --- >>> drivers/usb/gadget/udc/mv_udc_core.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/drivers/usb/gadget/udc/mv_udc_core.c >>> b/drivers/usb/gadget/udc/mv_udc_core.c >>> index 27ebb0d..56b3574 100644 >>> --- a/drivers/usb/gadget/udc/mv_udc_core.c >>> +++ b/drivers/usb/gadget/udc/mv_udc_core.c >>> @@ -489,6 +489,7 @@ static int mv_ep_enable(struct usb_ep *_ep, >>> break; >>> case USB_ENDPOINT_XFER_CONTROL: >>> ios = 1; >>> + break; >> >> are you SURE this is supposed to have this break statement? What if we >> want to initialize mult to 0 *also* for control endpoints? How did you >> test this? Do you have access to Marvel's documentation for this >> controller? >> > > Certainly I wasn't sure, but I also think this is kind of obscure > code. If that is the case that we also want to initialize mult to 0, > wouldn't it be clearer (for maintenance purposes) to add mult = 0 and > the break statement after ios = 1? > > What do you think if I modify that piece of code as follows: I think you need to test it, or get someone to test it for you :-) -- balbi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-02-08 09:20 +0100
Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch Felipe Balbi <balbi@kernel.org> - 2017-02-08 10:30 +0100
Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-02-08 12:00 +0100
Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch Felipe Balbi <balbi@kernel.org> - 2017-02-08 13:10 +0100
Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch Greg KH <gregkh@linuxfoundation.org> - 2017-02-08 14:20 +0100
Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch Felipe Balbi <balbi@kernel.org> - 2017-02-08 14:20 +0100
Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch Michal Nazarewicz <mina86@mina86.com> - 2017-02-08 14:30 +0100
Re: [PATCH 1/2] drivers: usb: gadget: udc: add missing break in switch Greg KH <gregkh@linuxfoundation.org> - 2017-02-08 18:40 +0100
csiph-web