From: Randy Dunlap <rdunlap@infradead.org> To: linux-usb@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Li Yang <leoyang.li@nxp.com>, linuxppc-dev@lists.ozlabs.org Subject: [RFC PATCH] usb: gadget: fsl_qe_udc: fix implicit-fallthrough warnings Date: Tue, 27 Apr 2021 21:08:55 -0700 [thread overview] Message-ID: <20210428040855.25907-1-rdunlap@infradead.org> (raw) 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(+) --- 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:
WARNING: multiple messages have this Message-ID (diff)
From: Randy Dunlap <rdunlap@infradead.org> To: linux-usb@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, linuxppc-dev@lists.ozlabs.org, Li Yang <leoyang.li@nxp.com> Subject: [RFC PATCH] usb: gadget: fsl_qe_udc: fix implicit-fallthrough warnings Date: Tue, 27 Apr 2021 21:08:55 -0700 [thread overview] Message-ID: <20210428040855.25907-1-rdunlap@infradead.org> (raw) 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(+) --- 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:
next reply other threads:[~2021-04-28 4:09 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-28 4:08 Randy Dunlap [this message] 2021-04-28 4:08 ` [RFC PATCH] usb: gadget: fsl_qe_udc: fix implicit-fallthrough warnings Randy Dunlap
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210428040855.25907-1-rdunlap@infradead.org \ --to=rdunlap@infradead.org \ --cc=leoyang.li@nxp.com \ --cc=linux-usb@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.