* [PATCH] Drivers: isdn: Drop unnecessary continue
@ 2015-07-28 7:16 Shraddha Barke
2015-07-28 7:28 ` Julia Lawall
0 siblings, 1 reply; 5+ messages in thread
From: Shraddha Barke @ 2015-07-28 7:16 UTC (permalink / raw)
To: Karsten Keil, Julia Lawall, netdev, linux-kernel; +Cc: Shraddha Barke
The semantic patch used to make this change is :
@@
@@
for (...;...;...) {
...
if (...) {
...
- continue;
}
}
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
drivers/isdn/hardware/mISDN/hfcsusb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
index 114f3bc..34e4b6c 100644
--- a/drivers/isdn/hardware/mISDN/hfcsusb.c
+++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
@@ -1923,7 +1923,6 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
(le16_to_cpu(dev->descriptor.idProduct)
== hfcsusb_idtab[i].idProduct)) {
vend_idx = i;
- continue;
}
}
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Drivers: isdn: Drop unnecessary continue
2015-07-28 7:16 [PATCH] Drivers: isdn: Drop unnecessary continue Shraddha Barke
@ 2015-07-28 7:28 ` Julia Lawall
0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2015-07-28 7:28 UTC (permalink / raw)
To: Shraddha Barke; +Cc: Karsten Keil, netdev, linux-kernel
On Tue, 28 Jul 2015, Shraddha Barke wrote:
> The semantic patch used to make this change is :
>
> @@
> @@
> for (...;...;...) {
> ...
> if (...) {
> ...
> - continue;
> }
> }
>
> Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
> ---
> drivers/isdn/hardware/mISDN/hfcsusb.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
> index 114f3bc..34e4b6c 100644
> --- a/drivers/isdn/hardware/mISDN/hfcsusb.c
> +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
> @@ -1923,7 +1923,6 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
> (le16_to_cpu(dev->descriptor.idProduct)
> == hfcsusb_idtab[i].idProduct)) {
> vend_idx = i;
> - continue;
Now there is only one statement in the branch, so the {} should go as
well.
julia
> }
> }
>
> --
> 2.1.0
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Drivers: isdn: Drop unnecessary continue
2015-07-28 8:41 Shraddha Barke
2015-07-28 8:47 ` Julia Lawall
@ 2015-07-28 10:18 ` Eric Dumazet
1 sibling, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2015-07-28 10:18 UTC (permalink / raw)
To: Shraddha Barke; +Cc: Karsten Keil, Julia Lawall, netdev, linux-kernel
On Tue, 2015-07-28 at 14:11 +0530, Shraddha Barke wrote:
> The semantic patch used to make this change is :
>
> @@
> @@
> for (...;...;...) {
> ...
> if (...) {
> ...
> - continue;
> }
> }
>
> Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
> ---
> drivers/isdn/hardware/mISDN/hfcsusb.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
> index 114f3bc..91beb83 100644
> --- a/drivers/isdn/hardware/mISDN/hfcsusb.c
> +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
> @@ -1921,10 +1921,9 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
> if ((le16_to_cpu(dev->descriptor.idVendor)
> == hfcsusb_idtab[i].idVendor) &&
> (le16_to_cpu(dev->descriptor.idProduct)
> - == hfcsusb_idtab[i].idProduct)) {
> + == hfcsusb_idtab[i].idProduct))
> vend_idx = i;
> - continue;
> - }
> +
> }
>
> printk(KERN_DEBUG
Well, it seems author intent was to use a break instead of a continue.
Not a big deal...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Drivers: isdn: Drop unnecessary continue
2015-07-28 8:41 Shraddha Barke
@ 2015-07-28 8:47 ` Julia Lawall
2015-07-28 10:18 ` Eric Dumazet
1 sibling, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2015-07-28 8:47 UTC (permalink / raw)
To: Shraddha Barke; +Cc: Karsten Keil, netdev, linux-kernel
The patch should have v2 in the subject line, and should have a
description of the change since the previous version under the ---
On Tue, 28 Jul 2015, Shraddha Barke wrote:
> The semantic patch used to make this change is :
>
> @@
> @@
> for (...;...;...) {
> ...
> if (...) {
> ...
> - continue;
> }
> }
>
> Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
> ---
> drivers/isdn/hardware/mISDN/hfcsusb.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
> index 114f3bc..91beb83 100644
> --- a/drivers/isdn/hardware/mISDN/hfcsusb.c
> +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
> @@ -1921,10 +1921,9 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
> if ((le16_to_cpu(dev->descriptor.idVendor)
> == hfcsusb_idtab[i].idVendor) &&
> (le16_to_cpu(dev->descriptor.idProduct)
> - == hfcsusb_idtab[i].idProduct)) {
> + == hfcsusb_idtab[i].idProduct))
> vend_idx = i;
> - continue;
> - }
> +
There is no need to add a blank line here.
julia
> }
>
> printk(KERN_DEBUG
> --
> 2.1.0
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Drivers: isdn: Drop unnecessary continue
@ 2015-07-28 8:41 Shraddha Barke
2015-07-28 8:47 ` Julia Lawall
2015-07-28 10:18 ` Eric Dumazet
0 siblings, 2 replies; 5+ messages in thread
From: Shraddha Barke @ 2015-07-28 8:41 UTC (permalink / raw)
To: Karsten Keil, Julia Lawall, netdev, linux-kernel; +Cc: Shraddha Barke
The semantic patch used to make this change is :
@@
@@
for (...;...;...) {
...
if (...) {
...
- continue;
}
}
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
drivers/isdn/hardware/mISDN/hfcsusb.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
index 114f3bc..91beb83 100644
--- a/drivers/isdn/hardware/mISDN/hfcsusb.c
+++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
@@ -1921,10 +1921,9 @@ hfcsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
if ((le16_to_cpu(dev->descriptor.idVendor)
== hfcsusb_idtab[i].idVendor) &&
(le16_to_cpu(dev->descriptor.idProduct)
- == hfcsusb_idtab[i].idProduct)) {
+ == hfcsusb_idtab[i].idProduct))
vend_idx = i;
- continue;
- }
+
}
printk(KERN_DEBUG
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-28 10:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28 7:16 [PATCH] Drivers: isdn: Drop unnecessary continue Shraddha Barke
2015-07-28 7:28 ` Julia Lawall
2015-07-28 8:41 Shraddha Barke
2015-07-28 8:47 ` Julia Lawall
2015-07-28 10:18 ` Eric Dumazet
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).