From: Guenter Roeck <linux@roeck-us.net>
To: Colin King <colin.king@canonical.com>
Cc: Rudolf Marek <r.marek@assembler.cz>,
Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: w83793d: remove redundant assignment to variable res
Date: Thu, 17 Oct 2019 06:39:01 -0700 [thread overview]
Message-ID: <20191017133901.GA31691@roeck-us.net> (raw)
In-Reply-To: <20191011170215.11539-1-colin.king@canonical.com>
On Fri, Oct 11, 2019 at 06:02:15PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable res is being initialized with a value that
> is never read and is being re-assigned a little 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>
Applied. Note that I removed the above Addreddes-Coverity tag as
it doesn't really make much sense.
Guenter
> ---
> drivers/hwmon/w83793.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c
> index 9df48b70c70c..a0307e6761b8 100644
> --- a/drivers/hwmon/w83793.c
> +++ b/drivers/hwmon/w83793.c
> @@ -2096,7 +2096,7 @@ static struct w83793_data *w83793_update_device(struct device *dev)
> static u8 w83793_read_value(struct i2c_client *client, u16 reg)
> {
> struct w83793_data *data = i2c_get_clientdata(client);
> - u8 res = 0xff;
> + u8 res;
> u8 new_bank = reg >> 8;
>
> new_bank |= data->bank & 0xfc;
prev parent reply other threads:[~2019-10-17 13:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 17:02 Colin King
2019-10-17 13:39 ` Guenter Roeck [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=20191017133901.GA31691@roeck-us.net \
--to=linux@roeck-us.net \
--cc=colin.king@canonical.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=r.marek@assembler.cz \
/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
Powered by JetHome