All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: isp1760-hcd: Fix fall-through annotations
@ 2019-05-01 15:39 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-05-01 15:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Arvid Brodin
  Cc: linux-usb, linux-kernel, Gustavo A. R. Silva

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.
	
Thanks
--
Gustavo

 drivers/usb/isp1760/isp1760-hcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c
index 8142c6b4c4cf..320fc4739835 100644
--- a/drivers/usb/isp1760/isp1760-hcd.c
+++ b/drivers/usb/isp1760/isp1760-hcd.c
@@ -788,11 +788,11 @@ static void collect_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh,
 					mem_reads8(hcd->regs, qtd->payload_addr,
 							qtd->data_buffer,
 							qtd->actual_length);
-					/* Fall through (?) */
+					/* Fall through */
 				case OUT_PID:
 					qtd->urb->actual_length +=
 							qtd->actual_length;
-					/* Fall through ... */
+					/* Fall through */
 				case SETUP_PID:
 					break;
 				}
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* usb: isp1760-hcd: Fix fall-through annotations
@ 2019-05-01 15:39 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-05-01 15:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Arvid Brodin
  Cc: linux-usb, linux-kernel, Gustavo A. R. Silva

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.
	
Thanks
--
Gustavo

 drivers/usb/isp1760/isp1760-hcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c
index 8142c6b4c4cf..320fc4739835 100644
--- a/drivers/usb/isp1760/isp1760-hcd.c
+++ b/drivers/usb/isp1760/isp1760-hcd.c
@@ -788,11 +788,11 @@ static void collect_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh,
 					mem_reads8(hcd->regs, qtd->payload_addr,
 							qtd->data_buffer,
 							qtd->actual_length);
-					/* Fall through (?) */
+					/* Fall through */
 				case OUT_PID:
 					qtd->urb->actual_length +=
 							qtd->actual_length;
-					/* Fall through ... */
+					/* Fall through */
 				case SETUP_PID:
 					break;
 				}

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb: isp1760-hcd: Fix fall-through annotations
@ 2019-05-01 16:03   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-05-01 16:03 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Arvid Brodin, linux-usb, linux-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* usb: isp1760-hcd: Fix fall-through annotations
@ 2019-05-01 16:03   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-05-01 16:03 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Arvid Brodin, linux-usb, linux-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] usb: isp1760-hcd: Fix fall-through annotations
@ 2019-05-01 16:13     ` Gustavo A. R. Silva
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-05-01 16:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Arvid Brodin, linux-usb, linux-kernel



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* usb: isp1760-hcd: Fix fall-through annotations
@ 2019-05-01 16:13     ` Gustavo A. R. Silva
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-05-01 16:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Arvid Brodin, linux-usb, linux-kernel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-05-01 16:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-01 15:39 [PATCH] usb: isp1760-hcd: Fix fall-through annotations Gustavo A. R. Silva
2019-05-01 15:39 ` Gustavo A. R. Silva
2019-05-01 16:03 ` [PATCH] " Greg Kroah-Hartman
2019-05-01 16:03   ` Greg Kroah-Hartman
2019-05-01 16:13   ` [PATCH] " Gustavo A. R. Silva
2019-05-01 16:13     ` Gustavo A. R. Silva

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.