linux-nfc.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [linux-nfc] [PATCH] nfc: mrvl: remove useless "continue" at end of loop
@ 2021-06-01 16:07 Krzysztof Kozlowski
       [not found] ` <5780056e09dbbd285d470a313939e5d3cc1a0c3e.camel@perches.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2021-06-01 16:07 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-nfc, netdev, linux-kernel

The "continue" statement at the end of a for loop does not have an
effect.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 drivers/nfc/nfcmrvl/usb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nfc/nfcmrvl/usb.c b/drivers/nfc/nfcmrvl/usb.c
index bcd563cb556c..433bdc37ba91 100644
--- a/drivers/nfc/nfcmrvl/usb.c
+++ b/drivers/nfc/nfcmrvl/usb.c
@@ -325,7 +325,6 @@ static int nfcmrvl_probe(struct usb_interface *intf,
 		if (!drv_data->bulk_rx_ep &&
 		    usb_endpoint_is_bulk_in(ep_desc)) {
 			drv_data->bulk_rx_ep = ep_desc;
-			continue;
 		}
 	}
 
-- 
2.27.0
_______________________________________________
Linux-nfc mailing list -- linux-nfc@lists.01.org
To unsubscribe send an email to linux-nfc-leave@lists.01.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

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

* [linux-nfc] Re: [PATCH] nfc: mrvl: remove useless "continue" at end of loop
       [not found] ` <5780056e09dbbd285d470a313939e5d3cc1a0c3e.camel@perches.com>
@ 2021-06-02 11:10   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2021-06-02 11:10 UTC (permalink / raw)
  To: Joe Perches, linux-nfc, netdev, linux-kernel

On 01/06/2021 18:30, Joe Perches wrote:
> On Tue, 2021-06-01 at 18:07 +0200, Krzysztof Kozlowski wrote:
>> The "continue" statement at the end of a for loop does not have an
>> effect.
> []
>> diff --git a/drivers/nfc/nfcmrvl/usb.c b/drivers/nfc/nfcmrvl/usb.c
> []
>> @@ -325,7 +325,6 @@ static int nfcmrvl_probe(struct usb_interface *intf,
>>  		if (!drv_data->bulk_rx_ep &&
>>  		    usb_endpoint_is_bulk_in(ep_desc)) {
>>  			drv_data->bulk_rx_ep = ep_desc;
>> -			continue;
>>  		}
>>  	}
> 
> I think this code would be clearer with an if/else instead of
> multiple continues.

Makes sense. I'll send a v2.


Best regards,
Krzysztof
_______________________________________________
Linux-nfc mailing list -- linux-nfc@lists.01.org
To unsubscribe send an email to linux-nfc-leave@lists.01.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

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

end of thread, other threads:[~2021-06-02 11:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 16:07 [linux-nfc] [PATCH] nfc: mrvl: remove useless "continue" at end of loop Krzysztof Kozlowski
     [not found] ` <5780056e09dbbd285d470a313939e5d3cc1a0c3e.camel@perches.com>
2021-06-02 11:10   ` [linux-nfc] " Krzysztof Kozlowski

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).