Message ID | 20210428040855.25907-1-rdunlap@infradead.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [RFC] usb: gadget: fsl_qe_udc: fix implicit-fallthrough warnings | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (1b628dbc3ccb0b51963fcb3c60b57daac21dc016) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | success | Build succeeded |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 32 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
--- linux-next-20210427.orig/drivers/usb/gadget/udc/fsl_qe_udc.c +++ linux-next-20210427/drivers/usb/gadget/udc/fsl_qe_udc.c @@ -541,6 +541,7 @@ static int qe_ep_init(struct qe_udc *udc case USB_SPEED_HIGH: if ((max == 128) || (max == 256) || (max == 512)) break; + fallthrough; default: switch (max) { case 4: @@ -562,9 +563,11 @@ static int qe_ep_init(struct qe_udc *udc case USB_SPEED_HIGH: if (max <= 1024) break; + fallthrough; case USB_SPEED_FULL: if (max <= 64) break; + fallthrough; default: if (max <= 8) break; @@ -579,6 +582,7 @@ static int qe_ep_init(struct qe_udc *udc case USB_SPEED_HIGH: if (max <= 1024) break; + fallthrough; case USB_SPEED_FULL: if (max <= 1023) break; @@ -605,6 +609,7 @@ static int qe_ep_init(struct qe_udc *udc default: goto en_done; } + fallthrough; case USB_SPEED_LOW: switch (max) { case 1:
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. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Li Yang <leoyang.li@nxp.com> Cc: linuxppc-dev@lists.ozlabs.org --- drivers/usb/gadget/udc/fsl_qe_udc.c | 5 +++++ 1 file changed, 5 insertions(+)