[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <562edc29-07ff-eaf5-5239-a30cd0add70c@embeddedor.com>
Date: Wed, 1 May 2019 11:13:44 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Arvid Brodin <arvid.brodin@...a.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: isp1760-hcd: Fix fall-through annotations
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@...eddedor.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
Powered by blists - more mailing lists