All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] power: reset: ltc2952: remove set but used variable
@ 2020-05-09 10:36 Hongbo Yao
  2020-05-09 23:42 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Hongbo Yao @ 2020-05-09 10:36 UTC (permalink / raw)
  To: sre; +Cc: yaohongbo, chenzhou10, linux-kernel, linux-pm

Fixes gcc '-Wunused-but-set-variable' warning:
drivers/power/reset/ltc2952-poweroff.c:97:16: warning: variable
‘overruns’ set but not used [-Wunused-but-set-variable]
  unsigned long overruns;

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
---
 drivers/power/reset/ltc2952-poweroff.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c
index e4a0cc45b3d1..318927938b05 100644
--- a/drivers/power/reset/ltc2952-poweroff.c
+++ b/drivers/power/reset/ltc2952-poweroff.c
@@ -94,7 +94,6 @@ static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer)
 {
 	ktime_t now;
 	int state;
-	unsigned long overruns;
 	struct ltc2952_poweroff *data = to_ltc2952(timer, timer_wde);
 
 	if (data->kernel_panic)
@@ -104,7 +103,7 @@ static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer)
 	gpiod_set_value(data->gpio_watchdog, !state);
 
 	now = hrtimer_cb_get_time(timer);
-	overruns = hrtimer_forward(timer, now, data->wde_interval);
+	hrtimer_forward(timer, now, data->wde_interval);
 
 	return HRTIMER_RESTART;
 }
-- 
2.20.1


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

* Re: [PATCH -next] power: reset: ltc2952: remove set but used variable
  2020-05-09 10:36 [PATCH -next] power: reset: ltc2952: remove set but used variable Hongbo Yao
@ 2020-05-09 23:42 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2020-05-09 23:42 UTC (permalink / raw)
  To: Hongbo Yao; +Cc: chenzhou10, linux-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

Hi,

On Sat, May 09, 2020 at 06:36:11PM +0800, Hongbo Yao wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> drivers/power/reset/ltc2952-poweroff.c:97:16: warning: variable
> ‘overruns’ set but not used [-Wunused-but-set-variable]
>   unsigned long overruns;
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/reset/ltc2952-poweroff.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c
> index e4a0cc45b3d1..318927938b05 100644
> --- a/drivers/power/reset/ltc2952-poweroff.c
> +++ b/drivers/power/reset/ltc2952-poweroff.c
> @@ -94,7 +94,6 @@ static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer)
>  {
>  	ktime_t now;
>  	int state;
> -	unsigned long overruns;
>  	struct ltc2952_poweroff *data = to_ltc2952(timer, timer_wde);
>  
>  	if (data->kernel_panic)
> @@ -104,7 +103,7 @@ static enum hrtimer_restart ltc2952_poweroff_timer_wde(struct hrtimer *timer)
>  	gpiod_set_value(data->gpio_watchdog, !state);
>  
>  	now = hrtimer_cb_get_time(timer);
> -	overruns = hrtimer_forward(timer, now, data->wde_interval);
> +	hrtimer_forward(timer, now, data->wde_interval);
>  
>  	return HRTIMER_RESTART;
>  }
> -- 
> 2.20.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-05-09 23:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 10:36 [PATCH -next] power: reset: ltc2952: remove set but used variable Hongbo Yao
2020-05-09 23:42 ` Sebastian Reichel

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.