All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] Staging:wlan-ng:Merged two lines into one
Date: Tue, 9 Feb 2016 07:31:53 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.02.1602090727070.2066@localhost6.localdomain6> (raw)
In-Reply-To: <1454959731-21240-1-git-send-email-bhumirks@gmail.com>

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


  parent reply	other threads:[~2016-02-09  6:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1602090727070.2066@localhost6.localdomain6 \
    --to=julia.lawall@lip6.fr \
    --cc=bhumirks@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.