Linux PWM subsystem development
 help / color / mirror / Atom feed
* [PATCH -next] pwm: pca9685: Remove set but not used variable 'pwm'
@ 2019-06-01  3:57 YueHaibing
  2019-06-01 13:03 ` Sven Van Asbroeck
  0 siblings, 1 reply; 12+ messages in thread
From: YueHaibing @ 2019-06-01  3:57 UTC (permalink / raw)
  To: Thierry Reding, u.kleine-koenig, andriy.shevchenko, thesven73
  Cc: YueHaibing, linux-pwm, kernel-janitors, linux-kernel

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/pwm/pwm-pca9685.c: In function 'pca9685_pwm_gpio_free':
drivers/pwm/pwm-pca9685.c:173:21: warning:
 variable 'pwm' set but not used [-Wunused-but-set-variable]

It's not used since commit e926b12c611c ("pwm: Clear chip_data in pwm_put()")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/pwm/pwm-pca9685.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c
index 567f5e2771c4..d16215c276bd 100644
--- a/drivers/pwm/pwm-pca9685.c
+++ b/drivers/pwm/pwm-pca9685.c
@@ -170,12 +170,10 @@ static void pca9685_pwm_gpio_set(struct gpio_chip *gpio, unsigned int offset,
 static void pca9685_pwm_gpio_free(struct gpio_chip *gpio, unsigned int offset)
 {
 	struct pca9685 *pca = gpiochip_get_data(gpio);
-	struct pwm_device *pwm;
 
 	pca9685_pwm_gpio_set(gpio, offset, 0);
 	pm_runtime_put(pca->chip.dev);
 	mutex_lock(&pca->lock);
-	pwm = &pca->chip.pwms[offset];
 	mutex_unlock(&pca->lock);
 }

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

end of thread, other threads:[~2020-05-24 10:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-01  3:57 [PATCH -next] pwm: pca9685: Remove set but not used variable 'pwm' YueHaibing
2019-06-01 13:03 ` Sven Van Asbroeck
2019-06-01 16:04   ` Uwe Kleine-König
2019-06-02 14:18     ` Sven Van Asbroeck
2019-06-03 11:40       ` Mika Westerberg
2019-06-03 15:08         ` Sven Van Asbroeck
2019-06-03 15:58           ` Mika Westerberg
2019-06-04 16:01           ` Andy Shevchenko
2019-06-06 15:11           ` Sven Van Asbroeck
2020-05-23 20:17             ` Uwe Kleine-König
2020-05-24  0:24               ` Sven Van Asbroeck
2020-05-24 10:21                 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox