public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [patch 33/39] power: reset: ltc2952: Remove bogus hrtimer_start() return value checks
       [not found] ` <20150414203503.322172417@linutronix.de>
@ 2015-04-14 21:38   ` Frans Klaver
  2015-04-30 15:49   ` Sebastian Reichel
  1 sibling, 0 replies; 2+ messages in thread
From: Frans Klaver @ 2015-04-14 21:38 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Peter Zijlstra, Ingo Molnar, Preeti U Murthy, Viresh Kumar,
	Marcelo Tosatti, Frederic Weisbecker, Sebastian Reichel,
	Dmitry Eremin-Solenikov, David Woodhouse, René Moll,
	Wolfram Sang, linux-pm

On Tue, Apr 14, 2015 at 09:09:20PM +0000, Thomas Gleixner wrote:
> The return value of hrtimer_start() tells whether the timer was
> inactive or active already when hrtimer_start() was called.
> 
> The code emits a bogus warning if the timer was active already
> claiming that the timer could not be started.
> 
> Remove it.

Thanks for catching this.

> Cc: "René Moll" <Rene.Moll@xsens.com>

Rene no longer works at Xsens, so this address is no longer in use. Instead:

Cc: "René Moll" <linux@r-moll.nl>

That said, I'm not sure if he's actively monitoring this mailbox, or
even if he should still be mentioned as maintainer of this driver.


> ---
>  drivers/power/reset/ltc2952-poweroff.c |   18 +++---------------
>  1 file changed, 3 insertions(+), 15 deletions(-)
> 
> Index: tip/drivers/power/reset/ltc2952-poweroff.c
> ===================================================================
> --- tip.orig/drivers/power/reset/ltc2952-poweroff.c
> +++ tip/drivers/power/reset/ltc2952-poweroff.c
> @@ -120,18 +120,7 @@ static enum hrtimer_restart ltc2952_powe
>  
>  static void ltc2952_poweroff_start_wde(struct ltc2952_poweroff *data)
>  {
> -	if (hrtimer_start(&data->timer_wde, data->wde_interval,
> -			  HRTIMER_MODE_REL)) {
> -		/*
> -		 * The device will not toggle the watchdog reset,
> -		 * thus shut down is only safe if the PowerPath controller
> -		 * has a long enough time-off before triggering a hardware
> -		 * power-off.
> -		 *
> -		 * Only sending a warning as the system will power-off anyway
> -		 */
> -		dev_err(data->dev, "unable to start the timer\n");
> -	}
> +	hrtimer_start(&data->timer_wde, data->wde_interval, HRTIMER_MODE_REL);
>  }
>  
>  static enum hrtimer_restart
> @@ -165,9 +154,8 @@ static irqreturn_t ltc2952_poweroff_hand
>  	}
>  
>  	if (gpiod_get_value(data->gpio_trigger)) {
> -		if (hrtimer_start(&data->timer_trigger, data->trigger_delay,
> -				  HRTIMER_MODE_REL))
> -			dev_err(data->dev, "unable to start the wait timer\n");
> +		hrtimer_start(&data->timer_trigger, data->trigger_delay,
> +			      HRTIMER_MODE_REL);
>  	} else {
>  		hrtimer_cancel(&data->timer_trigger);
>  		/* omitting return value check, timer should have been valid */

You might as well remove this bogus comment along with the rest.
hrtimer_cancel()s return value says nothing about the validity of the
passed timer.

In any case

Acked-by: Frans Klaver <frans.klaver@xsens.com>

Thanks,
Frans

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

* Re: [patch 33/39] power: reset: ltc2952: Remove bogus hrtimer_start() return value checks
       [not found] ` <20150414203503.322172417@linutronix.de>
  2015-04-14 21:38   ` [patch 33/39] power: reset: ltc2952: Remove bogus hrtimer_start() return value checks Frans Klaver
@ 2015-04-30 15:49   ` Sebastian Reichel
  1 sibling, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2015-04-30 15:49 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Peter Zijlstra, Ingo Molnar, Preeti U Murthy, Viresh Kumar,
	Marcelo Tosatti, Frederic Weisbecker, Dmitry Eremin-Solenikov,
	David Woodhouse, Frans Klaver, René Moll, Wolfram Sang,
	linux-pm

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

Hi,

On Tue, Apr 14, 2015 at 09:09:20PM -0000, Thomas Gleixner wrote:
> The return value of hrtimer_start() tells whether the timer was
> inactive or active already when hrtimer_start() was called.
> 
> The code emits a bogus warning if the timer was active already
> claiming that the timer could not be started.
> 
> Remove it.

Thanks, queued for 4.1-rc with Acked-By from Frans Klaver:

http://git.infradead.org/battery-2.6.git/commit/d8818257d3befce6ce7da4c09112654914c3fd58

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-04-30 15:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150414203303.702062272@linutronix.de>
     [not found] ` <20150414203503.322172417@linutronix.de>
2015-04-14 21:38   ` [patch 33/39] power: reset: ltc2952: Remove bogus hrtimer_start() return value checks Frans Klaver
2015-04-30 15:49   ` Sebastian Reichel

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