Commit f91e5d09 authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman

usb: gadget: fsl_qe_udc: fix implicit-fallthrough warnings

Quieten implicit-fallthrough warnings in fsl_qe_udc.c:

../drivers/usb/gadget/udc/fsl_qe_udc.c: In function 'qe_ep_init':
../drivers/usb/gadget/udc/fsl_qe_udc.c:542:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
  542 |    if ((max == 128) || (max == 256) || (max == 512))
../drivers/usb/gadget/udc/fsl_qe_udc.c:563:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
  563 |     if (max <= 1024)
../drivers/usb/gadget/udc/fsl_qe_udc.c:566:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
  566 |     if (max <= 64)
../drivers/usb/gadget/udc/fsl_qe_udc.c:580:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
  580 |     if (max <= 1024)
../drivers/usb/gadget/udc/fsl_qe_udc.c:596:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
  596 |     switch (max) {

This basically just documents what is currently being done.
If any of them need to do something else, just say so or
even make the change.

Cc: Li Yang <leoyang.li@nxp.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20210428040855.25907-1-rdunlap@infradead.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3403012
...@@ -541,6 +541,7 @@ static int qe_ep_init(struct qe_udc *udc, ...@@ -541,6 +541,7 @@ static int qe_ep_init(struct qe_udc *udc,
case USB_SPEED_HIGH: case USB_SPEED_HIGH:
if ((max == 128) || (max == 256) || (max == 512)) if ((max == 128) || (max == 256) || (max == 512))
break; break;
fallthrough;
default: default:
switch (max) { switch (max) {
case 4: case 4:
...@@ -562,9 +563,11 @@ static int qe_ep_init(struct qe_udc *udc, ...@@ -562,9 +563,11 @@ static int qe_ep_init(struct qe_udc *udc,
case USB_SPEED_HIGH: case USB_SPEED_HIGH:
if (max <= 1024) if (max <= 1024)
break; break;
fallthrough;
case USB_SPEED_FULL: case USB_SPEED_FULL:
if (max <= 64) if (max <= 64)
break; break;
fallthrough;
default: default:
if (max <= 8) if (max <= 8)
break; break;
...@@ -579,6 +582,7 @@ static int qe_ep_init(struct qe_udc *udc, ...@@ -579,6 +582,7 @@ static int qe_ep_init(struct qe_udc *udc,
case USB_SPEED_HIGH: case USB_SPEED_HIGH:
if (max <= 1024) if (max <= 1024)
break; break;
fallthrough;
case USB_SPEED_FULL: case USB_SPEED_FULL:
if (max <= 1023) if (max <= 1023)
break; break;
...@@ -605,6 +609,7 @@ static int qe_ep_init(struct qe_udc *udc, ...@@ -605,6 +609,7 @@ static int qe_ep_init(struct qe_udc *udc,
default: default:
goto en_done; goto en_done;
} }
fallthrough;
case USB_SPEED_LOW: case USB_SPEED_LOW:
switch (max) { switch (max) {
case 1: case 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment