From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Arvid Brodin <arvid.brodin@enea.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: usb: isp1760-hcd: Fix fall-through annotations
Date: Wed, 1 May 2019 18:03:27 +0200 [thread overview]
Message-ID: <20190501160327.GA19281@kroah.com> (raw)
On Wed, May 01, 2019 at 10:39:34AM -0500, 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/isp1760/isp1760-hcd.c: In function ‘collect_qtds’:
> drivers/usb/isp1760/isp1760-hcd.c:788:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> mem_reads8(hcd->regs, qtd->payload_addr,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> qtd->data_buffer,
> ~~~~~~~~~~~~~~~~~
> qtd->actual_length);
> ~~~~~~~~~~~~~~~~~~~
> drivers/usb/isp1760/isp1760-hcd.c:792:5: note: here
> case OUT_PID:
> ^~~~
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> Notice that, in this particular case, the code comments are 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>
> ---
> Notice that this code has been out there since 2011, and who
> introduced the question mark was the original developer.
>
> It'd be good if someone can confirm that the fall-through
> has been intentional all this time.
Yes, it looks intentional. Messy, and as no one has complained since
2011, let's leave it alone, I'll queue this up.
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Arvid Brodin <arvid.brodin@enea.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: isp1760-hcd: Fix fall-through annotations
Date: Wed, 1 May 2019 18:03:27 +0200 [thread overview]
Message-ID: <20190501160327.GA19281@kroah.com> (raw)
Message-ID: <20190501160327.FZUeM-2cUNsF4E_IjmojlaY_K-7Y6w1TP03ujYrHelA@z> (raw)
In-Reply-To: <20190501153934.GA20025@embeddedor>
On Wed, May 01, 2019 at 10:39:34AM -0500, 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/isp1760/isp1760-hcd.c: In function ‘collect_qtds’:
> drivers/usb/isp1760/isp1760-hcd.c:788:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> mem_reads8(hcd->regs, qtd->payload_addr,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> qtd->data_buffer,
> ~~~~~~~~~~~~~~~~~
> qtd->actual_length);
> ~~~~~~~~~~~~~~~~~~~
> drivers/usb/isp1760/isp1760-hcd.c:792:5: note: here
> case OUT_PID:
> ^~~~
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> Notice that, in this particular case, the code comments are 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>
> ---
> Notice that this code has been out there since 2011, and who
> introduced the question mark was the original developer.
>
> It'd be good if someone can confirm that the fall-through
> has been intentional all this time.
Yes, it looks intentional. Messy, and as no one has complained since
2011, let's leave it alone, I'll queue this up.
thanks,
greg k-h
next prev reply other threads:[~2019-05-01 16:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 15:39 usb: isp1760-hcd: Fix fall-through annotations Gustavo A. R. Silva
2019-05-01 15:39 ` [PATCH] " Gustavo A. R. Silva
2019-05-01 16:03 ` Greg Kroah-Hartman [this message]
2019-05-01 16:03 ` Greg Kroah-Hartman
2019-05-01 16:13 ` Gustavo A. R. Silva
2019-05-01 16:13 ` [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=20190501160327.GA19281@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arvid.brodin@enea.com \
--cc=gustavo@embeddedor.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).