All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging:wlan-ng:Merged two lines into one
@ 2016-02-08 19:28 Bhumika Goyal
  2016-02-08 19:39 ` [Outreachy kernel] " Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Bhumika Goyal @ 2016-02-08 19:28 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The last two lines of these functions are compressed into one.
Also removed the variable ret as it is now not used.
Found using coccinelle:
@@
expression e, ret;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 682de77..fda8a95 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
@@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
@@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
@@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
 			 u16 highaddr, u16 codelen)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
@@ -1161,9 +1151,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
 	cmd.parm1 = highaddr;
 	cmd.parm2 = codelen;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] Staging:wlan-ng:Merged two lines into one
  2016-02-08 19:28 [PATCH] Staging:wlan-ng:Merged two lines into one Bhumika Goyal
@ 2016-02-08 19:39 ` Greg KH
  2016-02-08 19:54   ` Bhumika Goyal
  2016-02-08 20:38   ` Julia Lawall
  2016-02-09  6:31 ` Julia Lawall
  2016-02-09  9:42 ` [PATCH v2] Staging: wlan-ng: Merge " Bhumika Goyal
  2 siblings, 2 replies; 13+ messages in thread
From: Greg KH @ 2016-02-08 19:39 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

On Tue, Feb 09, 2016 at 12:58:51AM +0530, Bhumika Goyal wrote:
> The last two lines of these functions are compressed into one.
> Also removed the variable ret as it is now not used.
> Found using coccinelle:
> @@
> expression e, ret;
> @@
> 
> -ret =
> +return
>      e;
> -return ret;
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)

We do not accept patches on the outreachy-kernel mailing list yet,
please submit these the "normal way" in order for them to be accepted to
the kernel community.

thanks,

greg k-h


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

* Re: [Outreachy kernel] [PATCH] Staging:wlan-ng:Merged two lines into one
  2016-02-08 19:39 ` [Outreachy kernel] " Greg KH
@ 2016-02-08 19:54   ` Bhumika Goyal
  2016-02-08 20:00     ` Greg KH
  2016-02-08 20:38   ` Julia Lawall
  1 sibling, 1 reply; 13+ messages in thread
From: Bhumika Goyal @ 2016-02-08 19:54 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: bhumirks


[-- Attachment #1.1: Type: text/plain, Size: 114 bytes --]

Thanks Greg. May I know when can I start submitting patches on the 
outreachy-kernel list.

Thanks,
Bhumika Goyal

[-- Attachment #1.2: Type: text/html, Size: 146 bytes --]

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

* Re: [Outreachy kernel] [PATCH] Staging:wlan-ng:Merged two lines into one
  2016-02-08 19:54   ` Bhumika Goyal
@ 2016-02-08 20:00     ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2016-02-08 20:00 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

On Mon, Feb 08, 2016 at 11:54:48AM -0800, Bhumika Goyal wrote:
> Thanks Greg. May I know when can I start submitting patches on the
> outreachy-kernel list.

It seems that the application process starts tomorrow, but I haven't
seen an announcement about it to know for sure that is the date, sorry.

greg k-h


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

* Re: [Outreachy kernel] [PATCH] Staging:wlan-ng:Merged two lines into one
  2016-02-08 19:39 ` [Outreachy kernel] " Greg KH
  2016-02-08 19:54   ` Bhumika Goyal
@ 2016-02-08 20:38   ` Julia Lawall
  2016-02-08 23:24     ` Greg KH
  1 sibling, 1 reply; 13+ messages in thread
From: Julia Lawall @ 2016-02-08 20:38 UTC (permalink / raw)
  To: Greg KH; +Cc: Bhumika Goyal, outreachy-kernel

On Mon, 8 Feb 2016, Greg KH wrote:

> On Tue, Feb 09, 2016 at 12:58:51AM +0530, Bhumika Goyal wrote:
> > The last two lines of these functions are compressed into one.
> > Also removed the variable ret as it is now not used.
> > Found using coccinelle:
> > @@
> > expression e, ret;
> > @@
> > 
> > -ret =
> > +return
> >      e;
> > -return ret;
> > 
> > Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> > ---
> >  drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
> >  1 file changed, 4 insertions(+), 16 deletions(-)
> 
> We do not accept patches on the outreachy-kernel mailing list yet,
> please submit these the "normal way" in order for them to be accepted to
> the kernel community.

Actually, it seems that it is already February 9 in her location :)

julia

> 
> thanks,
> 
> greg k-h
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160208193922.GA10743%40kroah.com.
> For more options, visit https://groups.google.com/d/optout.
> 


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

* Re: [Outreachy kernel] [PATCH] Staging:wlan-ng:Merged two lines into one
  2016-02-08 20:38   ` Julia Lawall
@ 2016-02-08 23:24     ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2016-02-08 23:24 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Bhumika Goyal, outreachy-kernel

On Mon, Feb 08, 2016 at 09:38:21PM +0100, Julia Lawall wrote:
> On Mon, 8 Feb 2016, Greg KH wrote:
> 
> > On Tue, Feb 09, 2016 at 12:58:51AM +0530, Bhumika Goyal wrote:
> > > The last two lines of these functions are compressed into one.
> > > Also removed the variable ret as it is now not used.
> > > Found using coccinelle:
> > > @@
> > > expression e, ret;
> > > @@
> > > 
> > > -ret =
> > > +return
> > >      e;
> > > -return ret;
> > > 
> > > Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> > > ---
> > >  drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
> > >  1 file changed, 4 insertions(+), 16 deletions(-)
> > 
> > We do not accept patches on the outreachy-kernel mailing list yet,
> > please submit these the "normal way" in order for them to be accepted to
> > the kernel community.
> 
> Actually, it seems that it is already February 9 in her location :)

Ugh, you are right, my apologies.

greg k-h


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

* Re: [Outreachy kernel] [PATCH] Staging:wlan-ng:Merged two lines into one
  2016-02-08 19:28 [PATCH] Staging:wlan-ng:Merged two lines into one Bhumika Goyal
  2016-02-08 19:39 ` [Outreachy kernel] " Greg KH
@ 2016-02-09  6:31 ` Julia Lawall
  2016-02-09  9:42 ` [PATCH v2] Staging: wlan-ng: Merge " Bhumika Goyal
  2 siblings, 0 replies; 13+ messages in thread
From: Julia Lawall @ 2016-02-09  6:31 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

The subject line should have a space after each :.  You can see this by 
doing

git log --oneline drivers/staging/wlan-ng/hfa384x_usb.c

Your subject line should look exactly like the ones there.

Also, the subject line should be in the imperative.  Thus Merge two 
lines... instead of Merged two lines...

Otherwise the change looks good.  Please send a v2 with an improved 
subject line and:

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

julia

On Tue, 9 Feb 2016, Bhumika Goyal wrote:

> The last two lines of these functions are compressed into one.
> Also removed the variable ret as it is now not used.
> Found using coccinelle:
> @@
> expression e, ret;
> @@
> 
> -ret =
> +return
>      e;
> -return ret;
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
> index 682de77..fda8a95 100644
> --- a/drivers/staging/wlan-ng/hfa384x_usb.c
> +++ b/drivers/staging/wlan-ng/hfa384x_usb.c
> @@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>  
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
> @@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>  
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>  
>  /*----------------------------------------------------------------
> @@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>  
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
> @@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>  
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>  
>  /*----------------------------------------------------------------
> @@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>  
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
> @@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>  
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>  
>  /*----------------------------------------------------------------
> @@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
>  			 u16 highaddr, u16 codelen)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>  
>  	pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
> @@ -1161,9 +1151,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
>  	cmd.parm1 = highaddr;
>  	cmd.parm2 = codelen;
>  
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>  
>  /*----------------------------------------------------------------
> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1454959731-21240-1-git-send-email-bhumirks%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


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

* [PATCH v2] Staging: wlan-ng: Merge two lines into one
  2016-02-08 19:28 [PATCH] Staging:wlan-ng:Merged two lines into one Bhumika Goyal
  2016-02-08 19:39 ` [Outreachy kernel] " Greg KH
  2016-02-09  6:31 ` Julia Lawall
@ 2016-02-09  9:42 ` Bhumika Goyal
  2016-02-09 10:16   ` [Outreachy kernel] " Julia Lawall
  2016-02-09 12:06   ` [PATCH v3] " Bhumika Goyal
  2 siblings, 2 replies; 13+ messages in thread
From: Bhumika Goyal @ 2016-02-09  9:42 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The last two lines of these functions are compressed into one.
Also removed the variable ret as it is now not used.
Found using coccinelle:
@@
expression e, ret;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
Changes since v1:
* Improve subject line.
---
 drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 682de77..fda8a95 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
@@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
@@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
@@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
 			 u16 highaddr, u16 codelen)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
@@ -1161,9 +1151,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
 	cmd.parm1 = highaddr;
 	cmd.parm2 = codelen;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH v2] Staging: wlan-ng: Merge two lines into one
  2016-02-09  9:42 ` [PATCH v2] Staging: wlan-ng: Merge " Bhumika Goyal
@ 2016-02-09 10:16   ` Julia Lawall
  2016-02-09 10:25     ` Bhumika Goyal
  2016-02-09 12:06   ` [PATCH v3] " Bhumika Goyal
  1 sibling, 1 reply; 13+ messages in thread
From: Julia Lawall @ 2016-02-09 10:16 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel



On Tue, 9 Feb 2016, Bhumika Goyal wrote:

> The last two lines of these functions are compressed into one.
> Also removed the variable ret as it is now not used.
> Found using coccinelle:
> @@
> expression e, ret;
> @@
>
> -ret =
> +return
>      e;
> -return ret;
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

I think I acked this?  You should keep the ack.

The subject line is now good.

julia

> ---
> Changes since v1:
> * Improve subject line.
> ---
>  drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
> index 682de77..fda8a95 100644
> --- a/drivers/staging/wlan-ng/hfa384x_usb.c
> +++ b/drivers/staging/wlan-ng/hfa384x_usb.c
> @@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
> @@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>
>  /*----------------------------------------------------------------
> @@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
> @@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>
>  /*----------------------------------------------------------------
> @@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
> @@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>
>  /*----------------------------------------------------------------
> @@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
>  			 u16 highaddr, u16 codelen)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>
>  	pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
> @@ -1161,9 +1151,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
>  	cmd.parm1 = highaddr;
>  	cmd.parm2 = codelen;
>
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>
>  /*----------------------------------------------------------------
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1455010952-24672-1-git-send-email-bhumirks%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [Outreachy kernel] [PATCH v2] Staging: wlan-ng: Merge two lines into one
  2016-02-09 10:16   ` [Outreachy kernel] " Julia Lawall
@ 2016-02-09 10:25     ` Bhumika Goyal
  2016-02-09 10:26       ` Julia Lawall
  0 siblings, 1 reply; 13+ messages in thread
From: Bhumika Goyal @ 2016-02-09 10:25 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: bhumirks


[-- Attachment #1.1: Type: text/plain, Size: 83 bytes --]

I am sorry I forgot to keep ack. Should I send v3 with added ack?

Thanks,
Bhumika

[-- Attachment #1.2: Type: text/html, Size: 116 bytes --]

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

* Re: [Outreachy kernel] [PATCH v2] Staging: wlan-ng: Merge two lines into one
  2016-02-09 10:25     ` Bhumika Goyal
@ 2016-02-09 10:26       ` Julia Lawall
  0 siblings, 0 replies; 13+ messages in thread
From: Julia Lawall @ 2016-02-09 10:26 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel



On Tue, 9 Feb 2016, Bhumika Goyal wrote:

> I am sorry I forgot to keep ack. Should I send v3 with added ack?

Yes.

julia

>
> Thanks,
> Bhumika
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/27fd7003-b4a6-4b3f-b93b-
> f19c3b310b1a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>


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

* [PATCH v3] Staging: wlan-ng: Merge two lines into one
  2016-02-09  9:42 ` [PATCH v2] Staging: wlan-ng: Merge " Bhumika Goyal
  2016-02-09 10:16   ` [Outreachy kernel] " Julia Lawall
@ 2016-02-09 12:06   ` Bhumika Goyal
  2016-02-09 12:19     ` [Outreachy kernel] " Julia Lawall
  1 sibling, 1 reply; 13+ messages in thread
From: Bhumika Goyal @ 2016-02-09 12:06 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

The last two lines of these functions are compressed into one.
Also removed the variable result  as it is now not used.
Found using coccinelle:
@@
expression e, ret;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Julia Lawall <julia....@lip6.fr>
---
Changes since v1:
* Improve subject line.
Changes since v2:
* Add acknowledgement.
---
 drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 682de77..fda8a95 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
@@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
@@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
 ----------------------------------------------------------------*/
 int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
@@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 	cmd.parm1 = 0;
 	cmd.parm2 = 0;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
@@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
 int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
 			 u16 highaddr, u16 codelen)
 {
-	int result = 0;
 	hfa384x_metacmd_t cmd;
 
 	pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
@@ -1161,9 +1151,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
 	cmd.parm1 = highaddr;
 	cmd.parm2 = codelen;
 
-	result = hfa384x_docmd_wait(hw, &cmd);
-
-	return result;
+	return hfa384x_docmd_wait(hw, &cmd);
 }
 
 /*----------------------------------------------------------------
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH v3] Staging: wlan-ng: Merge two lines into one
  2016-02-09 12:06   ` [PATCH v3] " Bhumika Goyal
@ 2016-02-09 12:19     ` Julia Lawall
  0 siblings, 0 replies; 13+ messages in thread
From: Julia Lawall @ 2016-02-09 12:19 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel



On Tue, 9 Feb 2016, Bhumika Goyal wrote:

> The last two lines of these functions are compressed into one.
> Also removed the variable result  as it is now not used.
> Found using coccinelle:
> @@
> expression e, ret;
> @@
>
> -ret =
> +return
>      e;
> -return ret;
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> Acked-by: Julia Lawall <julia....@lip6.fr>

Where did the ... come from?  At least in the web interface to the
outreachy mailing list, everything is there. It should be the exact email
address.

julia

> ---
> Changes since v1:
> * Improve subject line.
> Changes since v2:
> * Add acknowledgement.
> ---
>  drivers/staging/wlan-ng/hfa384x_usb.c | 20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
> index 682de77..fda8a95 100644
> --- a/drivers/staging/wlan-ng/hfa384x_usb.c
> +++ b/drivers/staging/wlan-ng/hfa384x_usb.c
> @@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
> @@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>
>  /*----------------------------------------------------------------
> @@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
> @@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>
>  /*----------------------------------------------------------------
> @@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
>  ----------------------------------------------------------------*/
>  int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>
>  	cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
> @@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  	cmd.parm1 = 0;
>  	cmd.parm2 = 0;
>
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>
>  /*----------------------------------------------------------------
> @@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
>  int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
>  			 u16 highaddr, u16 codelen)
>  {
> -	int result = 0;
>  	hfa384x_metacmd_t cmd;
>
>  	pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n",
> @@ -1161,9 +1151,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
>  	cmd.parm1 = highaddr;
>  	cmd.parm2 = codelen;
>
> -	result = hfa384x_docmd_wait(hw, &cmd);
> -
> -	return result;
> +	return hfa384x_docmd_wait(hw, &cmd);
>  }
>
>  /*----------------------------------------------------------------
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1455019592-29178-1-git-send-email-bhumirks%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

end of thread, other threads:[~2016-02-09 12:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 19:28 [PATCH] Staging:wlan-ng:Merged two lines into one Bhumika Goyal
2016-02-08 19:39 ` [Outreachy kernel] " Greg KH
2016-02-08 19:54   ` Bhumika Goyal
2016-02-08 20:00     ` Greg KH
2016-02-08 20:38   ` Julia Lawall
2016-02-08 23:24     ` Greg KH
2016-02-09  6:31 ` Julia Lawall
2016-02-09  9:42 ` [PATCH v2] Staging: wlan-ng: Merge " Bhumika Goyal
2016-02-09 10:16   ` [Outreachy kernel] " Julia Lawall
2016-02-09 10:25     ` Bhumika Goyal
2016-02-09 10:26       ` Julia Lawall
2016-02-09 12:06   ` [PATCH v3] " Bhumika Goyal
2016-02-09 12:19     ` [Outreachy kernel] " Julia Lawall

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.