All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Himadri Pandya <himadri18.07@gmail.com>
Cc: adham.abozaeid@microchip.com, ajay.kathat@microchip.com,
	outreachy-kernel@googlegroups.com
Subject: Re: [PATCH 1/2] staging: wilc1000: remove unnecessary variable ret
Date: Sat, 9 Mar 2019 14:41:11 +0100	[thread overview]
Message-ID: <20190309134111.GC4144@kroah.com> (raw)
In-Reply-To: <20190309110743.41443-2-himadri18.07@gmail.com>

On Sat, Mar 09, 2019 at 04:37:42PM +0530, Himadri Pandya wrote:
> Remove unnecessary local variable "ret" and its assignments from
> function wilc_set_tx_power. Suggested by Coccinelle.
> 
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index fa0e1bd9f836..4a5f83ae06d2 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -2119,7 +2119,6 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, u32 enabled, u32 count,
>  
>  int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power)
>  {
> -	int ret;
>  	struct wid wid;
>  
>  	wid.id = WID_TX_POWER;
> @@ -2127,10 +2126,9 @@ int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power)
>  	wid.val = &tx_power;
>  	wid.size = sizeof(char);
>  
> -	ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
> +	return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
>  				   wilc_get_vif_idx(vif));
>  
> -	return ret;
>  }
>  
>  int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power)
> -- 
> 2.17.1
>


Your two patches do the same thing, but your wording is just a _little_
different.  Why not make this just one patch that does that one thing,
for two different functions?

thanks,

greg k-h


  reply	other threads:[~2019-03-09 13:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-09 11:07 [PATCH 0/2] remove unnecessary local variables Himadri Pandya
2019-03-09 11:07 ` [PATCH 1/2] staging: wilc1000: remove unnecessary variable ret Himadri Pandya
2019-03-09 13:41   ` Greg KH [this message]
2019-03-09 15:15   ` [PATCH] staging: wilc1000: remove unnecessary local variables Himadri Pandya
2019-03-09 11:07 ` [PATCH 2/2] staging: wilc1000: remove unnecessary local variable Himadri Pandya
2019-03-09 13:37 ` [Outreachy kernel] [PATCH 0/2] remove unnecessary local variables Julia Lawall
2019-03-09 13:40 ` Greg KH
2019-03-09 15:17   ` Himadri Pandya

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=20190309134111.GC4144@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=adham.abozaeid@microchip.com \
    --cc=ajay.kathat@microchip.com \
    --cc=himadri18.07@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.