From: Anders Roxell <anders.roxell@linaro.org>
To: b.zolnierkie@samsung.com, jdelvare@suse.com, linux@roeck-us.net
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Anders Roxell <anders.roxell@linaro.org>
Subject: [PATCH] drivers: hwmon: pwm-fan: fix warning unused variable 'ctx'
Date: Tue, 1 Dec 2020 01:31:18 +0100 [thread overview]
Message-ID: <20201201003118.2219422-1-anders.roxell@linaro.org> (raw)
When building hwmon/pwm-fan the following unused-variable warning shows
up:
/tmp/drivers/hwmon/pwm-fan.c: In function ‘pwm_fan_is_visible’:
/tmp/drivers/hwmon/pwm-fan.c:167:22: warning: unused variable ‘ctx’ [-Wunused-variable]
Remove the unneeded variable declaration 'ctx'.
Fixes: 439ed83acc19 ("hwmon: (pwm-fan) Convert to hwmon_device_register_with_info API")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
drivers/hwmon/pwm-fan.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
index 57b574837b58..777439f48c14 100644
--- a/drivers/hwmon/pwm-fan.c
+++ b/drivers/hwmon/pwm-fan.c
@@ -164,8 +164,6 @@ static umode_t pwm_fan_is_visible(const void *data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{
- struct pwm_fan_ctx *ctx = (struct pwm_fan_ctx *)data;
-
switch (type) {
case hwmon_pwm:
return 0644;
--
2.29.2
next reply other threads:[~2020-12-01 0:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 0:31 Anders Roxell [this message]
2020-12-01 0:49 ` Guenter Roeck
2020-12-01 0:52 ` Anders Roxell
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=20201201003118.2219422-1-anders.roxell@linaro.org \
--to=anders.roxell@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/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
all inboxes | Powered by JetHome®