From: Guenter Roeck <linux@roeck-us.net>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Jean Delvare <jdelvare@suse.com>,
"Dr . David Alan Gilbert" <linux@treblig.org>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org, Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH -next] hwmon: (w83627ehf) Remove set but not used variable 'fan4min'
Date: Sat, 11 Jan 2020 03:44:39 +0000 [thread overview]
Message-ID: <20200111034438.GA15669@roeck-us.net> (raw)
In-Reply-To: <20200108034514.50130-1-yuehaibing@huawei.com>
On Wed, Jan 08, 2020 at 03:45:14AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/hwmon/w83627ehf.c: In function 'w83627ehf_check_fan_inputs':
> drivers/hwmon/w83627ehf.c:1296:24: warning:
> variable 'fan4min' set but not used [-Wunused-but-set-variable]
>
> commit 62000264cfa8 ("hwmon: (w83627ehf) remove nct6775 and nct6776 support")
> left behind this unused variable.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/w83627ehf.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
> index 5a7239eb1c15..7ffadc2da57b 100644
> --- a/drivers/hwmon/w83627ehf.c
> +++ b/drivers/hwmon/w83627ehf.c
> @@ -1293,7 +1293,7 @@ static void
> w83627ehf_check_fan_inputs(const struct w83627ehf_sio_data *sio_data,
> struct w83627ehf_data *data)
> {
> - int fan3pin, fan4pin, fan4min, fan5pin, regval;
> + int fan3pin, fan4pin, fan5pin, regval;
>
> /* The W83627UHG is simple, only two fan inputs, no config */
> if (sio_data->kind = w83627uhg) {
> @@ -1307,12 +1307,10 @@ w83627ehf_check_fan_inputs(const struct w83627ehf_sio_data *sio_data,
> fan3pin = 1;
> fan4pin = superio_inb(sio_data->sioreg, 0x27) & 0x40;
> fan5pin = superio_inb(sio_data->sioreg, 0x27) & 0x20;
> - fan4min = fan4pin;
> } else {
> fan3pin = 1;
> fan4pin = !(superio_inb(sio_data->sioreg, 0x29) & 0x06);
> fan5pin = !(superio_inb(sio_data->sioreg, 0x24) & 0x02);
> - fan4min = fan4pin;
> }
>
> data->has_fan = data->has_fan_min = 0x03; /* fan1 and fan2 */
WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Jean Delvare <jdelvare@suse.com>,
"Dr . David Alan Gilbert" <linux@treblig.org>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org, Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH -next] hwmon: (w83627ehf) Remove set but not used variable 'fan4min'
Date: Fri, 10 Jan 2020 19:44:39 -0800 [thread overview]
Message-ID: <20200111034438.GA15669@roeck-us.net> (raw)
In-Reply-To: <20200108034514.50130-1-yuehaibing@huawei.com>
On Wed, Jan 08, 2020 at 03:45:14AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/hwmon/w83627ehf.c: In function 'w83627ehf_check_fan_inputs':
> drivers/hwmon/w83627ehf.c:1296:24: warning:
> variable 'fan4min' set but not used [-Wunused-but-set-variable]
>
> commit 62000264cfa8 ("hwmon: (w83627ehf) remove nct6775 and nct6776 support")
> left behind this unused variable.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/w83627ehf.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
> index 5a7239eb1c15..7ffadc2da57b 100644
> --- a/drivers/hwmon/w83627ehf.c
> +++ b/drivers/hwmon/w83627ehf.c
> @@ -1293,7 +1293,7 @@ static void
> w83627ehf_check_fan_inputs(const struct w83627ehf_sio_data *sio_data,
> struct w83627ehf_data *data)
> {
> - int fan3pin, fan4pin, fan4min, fan5pin, regval;
> + int fan3pin, fan4pin, fan5pin, regval;
>
> /* The W83627UHG is simple, only two fan inputs, no config */
> if (sio_data->kind == w83627uhg) {
> @@ -1307,12 +1307,10 @@ w83627ehf_check_fan_inputs(const struct w83627ehf_sio_data *sio_data,
> fan3pin = 1;
> fan4pin = superio_inb(sio_data->sioreg, 0x27) & 0x40;
> fan5pin = superio_inb(sio_data->sioreg, 0x27) & 0x20;
> - fan4min = fan4pin;
> } else {
> fan3pin = 1;
> fan4pin = !(superio_inb(sio_data->sioreg, 0x29) & 0x06);
> fan5pin = !(superio_inb(sio_data->sioreg, 0x24) & 0x02);
> - fan4min = fan4pin;
> }
>
> data->has_fan = data->has_fan_min = 0x03; /* fan1 and fan2 */
next prev parent reply other threads:[~2020-01-11 3:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 3:45 [PATCH -next] hwmon: (w83627ehf) Remove set but not used variable 'fan4min' YueHaibing
2020-01-08 3:45 ` YueHaibing
2020-01-11 3:44 ` Guenter Roeck [this message]
2020-01-11 3:44 ` Guenter Roeck
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=20200111034438.GA15669@roeck-us.net \
--to=linux@roeck-us.net \
--cc=hulkci@huawei.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@treblig.org \
--cc=yuehaibing@huawei.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.