mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: hwmon: pwm-fan: fix warning unused variable 'ctx'
@ 2020-12-01  0:31 Anders Roxell
  2020-12-01  0:49 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Anders Roxell @ 2020-12-01  0:31 UTC (permalink / raw)
  To: b.zolnierkie, jdelvare, linux; +Cc: linux-hwmon, linux-kernel, Anders Roxell

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: hwmon: pwm-fan: fix warning unused variable 'ctx'
  2020-12-01  0:31 [PATCH] drivers: hwmon: pwm-fan: fix warning unused variable 'ctx' Anders Roxell
@ 2020-12-01  0:49 ` Guenter Roeck
  2020-12-01  0:52   ` Anders Roxell
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2020-12-01  0:49 UTC (permalink / raw)
  To: Anders Roxell; +Cc: b.zolnierkie, jdelvare, linux-hwmon, linux-kernel

On Tue, Dec 01, 2020 at 01:31:18AM +0100, Anders Roxell wrote:
> 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>

I already folded this change into the original patch.

Guenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: hwmon: pwm-fan: fix warning unused variable 'ctx'
  2020-12-01  0:49 ` Guenter Roeck
@ 2020-12-01  0:52   ` Anders Roxell
  0 siblings, 0 replies; 3+ messages in thread
From: Anders Roxell @ 2020-12-01  0:52 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: b.zolnierkie, jdelvare, linux-hwmon, Linux Kernel Mailing List

On Tue, 1 Dec 2020 at 01:49, Guenter Roeck <linux@roeck-us.net> wrote:
>
> On Tue, Dec 01, 2020 at 01:31:18AM +0100, Anders Roxell wrote:
> > 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>
>
> I already folded this change into the original patch.

That's great Guenter, I missed that. I'm sorry for the noise.

Cheers,
Anders

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-01  0:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01  0:31 [PATCH] drivers: hwmon: pwm-fan: fix warning unused variable 'ctx' Anders Roxell
2020-12-01  0:49 ` Guenter Roeck
2020-12-01  0:52   ` Anders Roxell

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®