Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933290AbdDSGu6 (ORCPT ); Wed, 19 Apr 2017 02:50:58 -0400 Received: from merlin.infradead.org ([205.233.59.134]:51878 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933239AbdDSGu4 (ORCPT ); Wed, 19 Apr 2017 02:50:56 -0400 Date: Wed, 19 Apr 2017 08:50:39 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , John Stultz , Eric Dumazet , Anna-Maria Gleixner , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Arjan van de Ven , "Paul E. McKenney" , Frederic Weisbecker , Rik van Riel Subject: Re: [patch V2 03/10] timers: Rework idle logic Message-ID: <20170419065039.nhmi5vrhydqy5ftw@hirez.programming.kicks-ass.net> References: <20170418111102.490432548@linutronix.de> <20170418111400.589271247@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170418111400.589271247@linutronix.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1120 Lines: 28 On Tue, Apr 18, 2017 at 01:11:05PM +0200, Thomas Gleixner wrote: > Storing next event and determining whether the base is idle can be done in > __next_timer_interrupt(). > > Preparatory patch for new call sites which need this information as well. > > Signed-off-by: Thomas Gleixner > --- > kernel/time/timer.c | 43 ++++++++++++++++++++++++------------------- > 1 file changed, 24 insertions(+), 19 deletions(-) > > --- a/kernel/time/timer.c > +++ b/kernel/time/timer.c > @@ -1358,8 +1358,11 @@ static int next_pending_bucket(struct ti > /* > * Search the first expiring timer in the various clock levels. Caller must > * hold base->lock. > + * > + * Stores the next expiry time in base. The return value indicates whether > + * the base is empty or not. > */ > -static unsigned long __next_timer_interrupt(struct timer_base *base) > +static bool __next_timer_interrupt(struct timer_base *base) Can't say I'm a fan of this.. I sort of see where this is going, but the fact remains that __next_timer_interrupt(), as a function, makes me expect a return value of time/timer quantity.