All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Liu <b-liu@ti.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] USB: musb: mark expected switch fall-through
Date: Tue, 12 Feb 2019 13:47:54 -0600	[thread overview]
Message-ID: <20190212194754.GA28664@uda0271908> (raw)
In-Reply-To: <20190212192357.GA15275@embeddedor>

Hi Greg,

On Tue, Feb 12, 2019 at 01:23:57PM -0600, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
> 
> This patch fixes the following warning:
> 
> drivers/usb/musb/musb_host.c: In function ‘musb_advance_schedule’:
> drivers/usb/musb/musb_host.c:374:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     if (qh->mux == 1) {
>        ^
> drivers/usb/musb/musb_host.c:383:3: note: here
>    case USB_ENDPOINT_XFER_ISOC:
>    ^~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> Notice that, in this particular case, the code comment is modified
> in accordance with what GCC is expecting to find.
> 
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

I've closed my musb tree for v5.1-rc1, if you want to directly pick this
patch, here is my Acked-by, or I will take it for v5.2-rc1.

Acked-by: Bin Liu <b-liu@ti.com>

> ---
>  drivers/usb/musb/musb_host.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
> index b59ce9ad14ce..0566d5b6252e 100644
> --- a/drivers/usb/musb/musb_host.c
> +++ b/drivers/usb/musb/musb_host.c
> @@ -378,7 +378,7 @@ static void musb_advance_schedule(struct musb *musb, struct urb *urb,
>  				qh = first_qh(head);
>  				break;
>  			}
> -			/* else: fall through */
> +			/* fall through */
>  
>  		case USB_ENDPOINT_XFER_ISOC:
>  		case USB_ENDPOINT_XFER_INT:
> -- 
> 2.20.1

Regards,
-Bin.

  reply	other threads:[~2019-02-12 19:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 19:23 USB: musb: mark expected switch fall-through Gustavo A. R. Silva
2019-02-12 19:23 ` [PATCH] " Gustavo A. R. Silva
2019-02-12 19:47 ` Bin Liu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-13  9:08 Greg Kroah-Hartman
2019-02-13  9:08 ` [PATCH] " Greg Kroah-Hartman
2019-02-13 18:15 Gustavo A. R. Silva
2019-02-13 18:15 ` [PATCH] " Gustavo A. R. Silva

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=20190212194754.GA28664@uda0271908 \
    --to=b-liu@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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: link
Be 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.