All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Cc: outreachy-kernel@googlegroups.com, ajay.kathat@microchip.com,
	adham.abozaeid@microchip.com
Subject: Re: [PATCH v2 3/3] staging: wilc1000: Remove return variables in wilc_spi.c
Date: Thu, 21 Mar 2019 19:57:19 +0100	[thread overview]
Message-ID: <20190321185719.GA6828@kroah.com> (raw)
In-Reply-To: <20190321074927.2865-4-nishka.dasgupta@yahoo.com>

On Thu, Mar 21, 2019 at 01:19:27PM +0530, Nishka Dasgupta wrote:
> Remove return variables in wilc_spi.c. Issue found with Coccinelle using
> ret.cocci.
> 
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
> ---
>  drivers/staging/wilc1000/wilc_spi.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
> index 4a1be9e60d74..66ac08c92927 100644
> --- a/drivers/staging/wilc1000/wilc_spi.c
> +++ b/drivers/staging/wilc1000/wilc_spi.c
> @@ -934,9 +934,8 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status)
>  	int k = IRG_FLAGS_OFFSET + 5;
>  
>  	if (spi_priv->has_thrpt_enh) {
> -		ret = spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE,
> -					int_status);
> -		return ret;
> +		return spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE,
> +					 int_status);
>  	}
>  	ret = wilc_spi_read_reg(wilc, WILC_VMM_TO_HOST_SIZE, &byte_cnt);
>  	if (!ret) {
> @@ -982,9 +981,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
>  	u32 tbl_ctl;
>  
>  	if (spi_priv->has_thrpt_enh) {
> -		ret = spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE,
> -					 val);
> -		return ret;
> +		return spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE, 
> +					  val);

Always run your patches through checkpatch.pl so that you do not get
grumpy maintainers telling you to run your patches through checkpatch.pl
before sending them out :)

Please fix up...

greg k-h


      reply	other threads:[~2019-03-21 18:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21  7:49 [PATCH v2 0/3] staging: wilc1000: Remove return variables Nishka Dasgupta
2019-03-21  7:49 ` [PATCH v2 1/3] staging: wilc1000: Remove return variables in host_interface.c Nishka Dasgupta
2019-03-21 18:59   ` Greg KH
2019-03-21  7:49 ` [PATCH v2 2/3] staging: wilc1000: Remove return variable " Nishka Dasgupta
2019-03-21  7:49 ` [PATCH v2 3/3] staging: wilc1000: Remove return variables in wilc_spi.c Nishka Dasgupta
2019-03-21 18:57   ` Greg KH [this message]

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=20190321185719.GA6828@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=adham.abozaeid@microchip.com \
    --cc=ajay.kathat@microchip.com \
    --cc=nishka.dasgupta@yahoo.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.