Drivers: isdn: Drop unnecessary continue
diff mbox series

Message ID 1438072868-5408-1-git-send-email-shraddha.6596@gmail.com
State New, archived
Headers show
Series
  • Drivers: isdn: Drop unnecessary continue
Related show

Commit Message

Shraddha Barke July 28, 2015, 8:41 a.m. UTC
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(-)

Comments

Julia Lawall July 28, 2015, 8:47 a.m. UTC | #1
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
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Eric Dumazet July 28, 2015, 10:18 a.m. UTC | #2
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...


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch
diff mbox series

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