From: Joe Perches <joe@perches.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicholas Mc Guire <hofrat@osadl.org>,
Michal Marek <mmarek@suse.cz>,
Masahiro Yamada <yamada.m@jp.panasonic.com>,
Sam Ravnborg <sam@ravnborg.org>, "H. Peter Alvin" <hpa@zytor.com>,
John Stultz <john.stultz@linaro.org>,
Andrew Hunter <ahh@google.com>, Paul Turner <pjt@google.com>,
Aaron Sierra <asierra@xes-inc.com>,
Brian Norris <computersforpeace@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3 V2] time: allow gcc to fold constants when using
Date: Wed, 22 Apr 2015 07:18:29 -0700 [thread overview]
Message-ID: <1429712309.32612.10.camel@perches.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1504221356340.13914@nanos>
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.
next prev parent reply other threads:[~2015-04-22 14:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-12 12:13 [PATCH 0/3 V2] time: use __builtin_constant_p() in msecs_to_jiffies Nicholas Mc Guire
2015-04-12 12:13 ` [PATCH 1/3 V2] time: move timeconst.h into include/generated Nicholas Mc Guire
2015-04-12 21:35 ` Rob Landley
2015-04-12 12:13 ` [PATCH 2/3 V2] time: allow gcc to fold constants when using Nicholas Mc Guire
2015-04-22 12:00 ` Thomas Gleixner
2015-04-22 14:18 ` Joe Perches [this message]
2015-04-22 15:12 ` Nicholas Mc Guire
2015-04-22 14:36 ` Nicholas Mc Guire
2015-04-22 14:44 ` Thomas Gleixner
2015-04-12 12:13 ` [PATCH 3/3 V2] time: update msecs_to_jiffies doc and move to kernel-doc Nicholas Mc Guire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429712309.32612.10.camel@perches.com \
--to=joe@perches.com \
--cc=ahh@google.com \
--cc=asierra@xes-inc.com \
--cc=computersforpeace@gmail.com \
--cc=hofrat@osadl.org \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=pjt@google.com \
--cc=sam@ravnborg.org \
--cc=tglx@linutronix.de \
--cc=yamada.m@jp.panasonic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox