public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <Claudiu.Beznea@microchip.com>
To: <colin.king@canonical.com>, <Adham.Abozaeid@microchip.com>,
	<Ajay.Kathat@microchip.com>, <gregkh@linuxfoundation.org>,
	<linux-wireless@vger.kernel.org>, <devel@driverdev.osuosl.org>
Cc: <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][next] staging: wilc1000: remove redundant assignment to variable result
Date: Thu, 16 Jan 2020 11:08:50 +0000	[thread overview]
Message-ID: <a0631a12-a183-30fa-98da-036673d7f207@microchip.com> (raw)
In-Reply-To: <20200114172720.376286-1-colin.king@canonical.com>



On 14.01.2020 19:27, Colin King wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable result is being initialized with a value that
> is never read and is being re-assigned later on. The assignment
> is redundant and hence can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>

> ---
>  drivers/staging/wilc1000/spi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/spi.c b/drivers/staging/wilc1000/spi.c
> index 55f8757325f0..8694ab5fcb22 100644
> --- a/drivers/staging/wilc1000/spi.c
> +++ b/drivers/staging/wilc1000/spi.c
> @@ -733,7 +733,7 @@ static int spi_internal_read(struct wilc *wilc, u32 adr, u32 *data)
>  static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, u32 data)
>  {
>         struct spi_device *spi = to_spi_device(wilc->dev);
> -       int result = N_OK;
> +       int result;
>         u8 cmd = CMD_SINGLE_WRITE;
>         u8 clockless = 0;
> 
> @@ -782,7 +782,7 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
>  static int wilc_spi_read_reg(struct wilc *wilc, u32 addr, u32 *data)
>  {
>         struct spi_device *spi = to_spi_device(wilc->dev);
> -       int result = N_OK;
> +       int result;
>         u8 cmd = CMD_SINGLE_READ;
>         u8 clockless = 0;
> 
> --
> 2.24.0
> 
> 

      reply	other threads:[~2020-01-16 11:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 17:27 [PATCH][next] staging: wilc1000: remove redundant assignment to variable result Colin King
2020-01-16 11:08 ` Claudiu.Beznea [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=a0631a12-a183-30fa-98da-036673d7f207@microchip.com \
    --to=claudiu.beznea@microchip.com \
    --cc=Adham.Abozaeid@microchip.com \
    --cc=Ajay.Kathat@microchip.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox