[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429712309.32612.10.camel@perches.com>
Date: Wed, 22 Apr 2015 07:18:29 -0700
From: Joe Perches <joe@...ches.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Nicholas Mc Guire <hofrat@...dl.org>,
Michal Marek <mmarek@...e.cz>,
Masahiro Yamada <yamada.m@...panasonic.com>,
Sam Ravnborg <sam@...nborg.org>,
"H. Peter Alvin" <hpa@...or.com>,
John Stultz <john.stultz@...aro.org>,
Andrew Hunter <ahh@...gle.com>, Paul Turner <pjt@...gle.com>,
Aaron Sierra <asierra@...-inc.com>,
Brian Norris <computersforpeace@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3 V2] time: allow gcc to fold constants when using
On Wed, 2015-04-22 at 14:00 +0200, Thomas Gleixner wrote:
> On Sun, 12 Apr 2015, Nicholas Mc Guire wrote:
> > +extern unsigned long __msecs_to_jiffies(const unsigned int m);
> > +#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
> > +static inline unsigned long _msecs_to_jiffies(const unsigned int m)
> > +{
>
> This should move the comments explaining the logic for each variant as
> well.
[]
> It'd be nice to have this as two patches:
>
> 1) Factor out the code into inline helpers w/o adding anything
It also might be nice to use a single static inline
with #ifdef blocks inside that inline rather than
have 3 separate static inline msecs_to_jiffies.
> 2) Add the __builtin_constant_p() check
And please add the usecs_to_jiffies variants in a
similar patch set.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists