All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfc: mrvl: remove useless "continue" at end of loop
@ 2021-06-01 16:07 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ 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


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

* [linux-nfc] [PATCH] nfc: mrvl: remove useless "continue" at end of loop
@ 2021-06-01 16:07 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ 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	[flat|nested] 7+ messages in thread

* Re: [PATCH] nfc: mrvl: remove useless "continue" at end of loop
  2021-06-01 16:07 ` [linux-nfc] " Krzysztof Kozlowski
  (?)
@ 2021-06-01 16:30 ` Joe Perches
  2021-06-01 16:38   ` [PATCH] MAINTAINERS: nfc mailing lists are subscribers-only Joe Perches
  2021-06-02 11:10     ` [linux-nfc] " Krzysztof Kozlowski
  -1 siblings, 2 replies; 7+ messages in thread
From: Joe Perches @ 2021-06-01 16:30 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-nfc, netdev, linux-kernel

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.

---
 drivers/nfc/nfcmrvl/usb.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/nfc/nfcmrvl/usb.c b/drivers/nfc/nfcmrvl/usb.c
index bcd563cb556ce..1616b873b15e6 100644
--- a/drivers/nfc/nfcmrvl/usb.c
+++ b/drivers/nfc/nfcmrvl/usb.c
@@ -296,7 +296,6 @@ static void nfcmrvl_waker(struct work_struct *work)
 static int nfcmrvl_probe(struct usb_interface *intf,
 			 const struct usb_device_id *id)
 {
-	struct usb_endpoint_descriptor *ep_desc;
 	struct nfcmrvl_usb_drv_data *drv_data;
 	struct nfcmrvl_private *priv;
 	int i;
@@ -314,19 +313,16 @@ static int nfcmrvl_probe(struct usb_interface *intf,
 		return -ENOMEM;
 
 	for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
+		struct usb_endpoint_descriptor *ep_desc;
+
 		ep_desc = &intf->cur_altsetting->endpoint[i].desc;
 
 		if (!drv_data->bulk_tx_ep &&
-		    usb_endpoint_is_bulk_out(ep_desc)) {
+		    usb_endpoint_is_bulk_out(ep_desc))
 			drv_data->bulk_tx_ep = ep_desc;
-			continue;
-		}
-
-		if (!drv_data->bulk_rx_ep &&
-		    usb_endpoint_is_bulk_in(ep_desc)) {
+		else if (!drv_data->bulk_rx_ep &&
+			 usb_endpoint_is_bulk_in(ep_desc))
 			drv_data->bulk_rx_ep = ep_desc;
-			continue;
-		}
 	}
 
 	if (!drv_data->bulk_tx_ep || !drv_data->bulk_rx_ep)



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

* [PATCH] MAINTAINERS: nfc mailing lists are subscribers-only
  2021-06-01 16:30 ` Joe Perches
@ 2021-06-01 16:38   ` Joe Perches
  2021-06-02  0:20     ` patchwork-bot+netdevbpf
  2021-06-02 11:10     ` [linux-nfc] " Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Joe Perches @ 2021-06-01 16:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski, linux-nfc, netdev, linux-kernel, Andrew Morton

It looks as if the MAINTAINERS entries for the nfc mailing list
should be updated as I just got a "rejected" bounce from the nfc list.

-------
Your message to the Linux-nfc mailing-list was rejected for the following
reasons:

The message is not from a list member
-------

Signed-off-by: Joe Perches <joe@perches.com>
---
 MAINTAINERS | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 0e5f02b1c284c..f989cc806943b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12975,7 +12975,7 @@ F:	net/ipv4/nexthop.c
 
 NFC SUBSYSTEM
 M:	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
-L:	linux-nfc@lists.01.org (moderated for non-subscribers)
+L:	linux-nfc@lists.01.org (subscribers-only)
 L:	netdev@vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/net/nfc/
@@ -12988,7 +12988,7 @@ F:	net/nfc/
 NFC VIRTUAL NCI DEVICE DRIVER
 M:	Bongsu Jeon <bongsu.jeon@samsung.com>
 L:	netdev@vger.kernel.org
-L:	linux-nfc@lists.01.org (moderated for non-subscribers)
+L:	linux-nfc@lists.01.org (subscribers-only)
 S:	Supported
 F:	drivers/nfc/virtual_ncidev.c
 F:	tools/testing/selftests/nci/
@@ -13293,7 +13293,7 @@ F:	sound/soc/codecs/tfa989x.c
 
 NXP-NCI NFC DRIVER
 R:	Charles Gorand <charles.gorand@effinnov.com>
-L:	linux-nfc@lists.01.org (moderated for non-subscribers)
+L:	linux-nfc@lists.01.org (subscribers-only)
 S:	Supported
 F:	drivers/nfc/nxp-nci
 
@@ -16249,7 +16249,7 @@ F:	include/media/drv-intf/s3c_camif.h
 SAMSUNG S3FWRN5 NFC DRIVER
 M:	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
 M:	Krzysztof Opasiak <k.opasiak@samsung.com>
-L:	linux-nfc@lists.01.org (moderated for non-subscribers)
+L:	linux-nfc@lists.01.org (subscribers-only)
 S:	Maintained
 F:	Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
 F:	drivers/nfc/s3fwrn5
@@ -18448,7 +18448,7 @@ F:	sound/soc/codecs/tas571x*
 TI TRF7970A NFC DRIVER
 M:	Mark Greer <mgreer@animalcreek.com>
 L:	linux-wireless@vger.kernel.org
-L:	linux-nfc@lists.01.org (moderated for non-subscribers)
+L:	linux-nfc@lists.01.org (subscribers-only)
 S:	Supported
 F:	Documentation/devicetree/bindings/net/nfc/trf7970a.txt
 F:	drivers/nfc/trf7970a.c


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

* Re: [PATCH] MAINTAINERS: nfc mailing lists are subscribers-only
  2021-06-01 16:38   ` [PATCH] MAINTAINERS: nfc mailing lists are subscribers-only Joe Perches
@ 2021-06-02  0:20     ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-02  0:20 UTC (permalink / raw)
  To: Joe Perches; +Cc: krzysztof.kozlowski, linux-nfc, netdev, linux-kernel, akpm

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue, 01 Jun 2021 09:38:58 -0700 you wrote:
> It looks as if the MAINTAINERS entries for the nfc mailing list
> should be updated as I just got a "rejected" bounce from the nfc list.
> 
> -------
> Your message to the Linux-nfc mailing-list was rejected for the following
> reasons:
> 
> [...]

Here is the summary with links:
  - MAINTAINERS: nfc mailing lists are subscribers-only
    https://git.kernel.org/netdev/net/c/b000372627ce

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH] nfc: mrvl: remove useless "continue" at end of loop
  2021-06-01 16:30 ` Joe Perches
@ 2021-06-02 11:10     ` Krzysztof Kozlowski
  2021-06-02 11:10     ` [linux-nfc] " Krzysztof Kozlowski
  1 sibling, 0 replies; 7+ 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

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

* [linux-nfc] Re: [PATCH] nfc: mrvl: remove useless "continue" at end of loop
@ 2021-06-02 11:10     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ 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] 7+ messages in thread

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 16:07 [PATCH] nfc: mrvl: remove useless "continue" at end of loop Krzysztof Kozlowski
2021-06-01 16:07 ` [linux-nfc] " Krzysztof Kozlowski
2021-06-01 16:30 ` Joe Perches
2021-06-01 16:38   ` [PATCH] MAINTAINERS: nfc mailing lists are subscribers-only Joe Perches
2021-06-02  0:20     ` patchwork-bot+netdevbpf
2021-06-02 11:10   ` [PATCH] nfc: mrvl: remove useless "continue" at end of loop Krzysztof Kozlowski
2021-06-02 11:10     ` [linux-nfc] " Krzysztof Kozlowski

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.