From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 11:13:44 -0500 [thread overview]
Message-ID: <562edc29-07ff-eaf5-5239-a30cd0add70c@embeddedor.com> (raw)
On 5/1/19 11:03 AM, Greg Kroah-Hartman wrote:
> 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.
>
Great.
Thanks, Greg.
---
Gustavo
WARNING: multiple messages have this Message-ID (diff)
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 11:13:44 -0500 [thread overview]
Message-ID: <562edc29-07ff-eaf5-5239-a30cd0add70c@embeddedor.com> (raw)
Message-ID: <20190501161344.gLCDNB7iarreVLUXSs1K9hv-BeKg44rAJlOiYolfFG8@z> (raw)
In-Reply-To: <20190501160327.GA19281@kroah.com>
On 5/1/19 11:03 AM, Greg Kroah-Hartman wrote:
> 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.
>
Great.
Thanks, Greg.
--
Gustavo
next prev reply other threads:[~2019-05-01 16:13 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
2019-05-01 16:03 ` [PATCH] " Greg Kroah-Hartman
2019-05-01 16:13 ` Gustavo A. R. Silva [this message]
2019-05-01 16:13 ` 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=562edc29-07ff-eaf5-5239-a30cd0add70c@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=arvid.brodin@enea.com \
--cc=gregkh@linuxfoundation.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 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).