Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932254AbbDNVuF (ORCPT ); Tue, 14 Apr 2015 17:50:05 -0400 Received: from filter1.ibarracuda.nl ([83.247.7.10]:34443 "EHLO filter1.ibarracuda.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932202AbbDNVt5 (ORCPT ); Tue, 14 Apr 2015 17:49:57 -0400 X-ASG-Debug-ID: 1429047511-0759e74add12b2e70002-xx1T2L X-Barracuda-Envelope-From: Frans.Klaver@xsens.com X-Barracuda-AUTH-User: xsenscom X-Barracuda-Apparent-Source-IP: 87.249.116.215 Date: Tue, 14 Apr 2015 23:38:28 +0200 From: Frans Klaver 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 , =?utf-8?B?UmVuw4PCqQ==?= Moll , Wolfram Sang , Subject: Re: [patch 33/39] power: reset: ltc2952: Remove bogus hrtimer_start() return value checks Message-ID: <20150414213828.GA30224@ci00147.xsens-tech.local> X-ASG-Orig-Subj: Re: [patch 33/39] power: reset: ltc2952: Remove bogus hrtimer_start() return value checks References: <20150414203303.702062272@linutronix.de> <20150414203503.322172417@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150414203503.322172417@linutronix.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [172.16.11.49] X-Barracuda-Connect: rev-215.116.249.87.virtu.nl[87.249.116.215] X-Barracuda-Start-Time: 1429047511 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: https://filter1.ibarracuda.nl:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.17923 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2675 Lines: 77 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 no longer works at Xsens, so this address is no longer in use. Instead: Cc: "René Moll" 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 Thanks, Frans -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/