From: Ganesh Mahendran <opensource.ganesh@gmail.com>
To: linux-kernel@vger.kernel.org, corbet@lwn.net, mingo@kernel.org,
peterz@infradead.org, linux-doc@vger.kernel.org
Cc: Ganesh Mahendran <opensource.ganesh@gmail.com>
Subject: [PATCH] use macro SHIFT instead of hard code 32
Date: Thu, 6 Jul 2017 15:46:41 +0800 [thread overview]
Message-ID: <1499327201-4805-1-git-send-email-opensource.ganesh@gmail.com> (raw)
32 is already defined as macro SHIFT, so it's better
to use macro SHIFT
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
---
Documentation/scheduler/sched-pelt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/scheduler/sched-pelt.c b/Documentation/scheduler/sched-pelt.c
index e421913..726cb31 100644
--- a/Documentation/scheduler/sched-pelt.c
+++ b/Documentation/scheduler/sched-pelt.c
@@ -22,7 +22,7 @@ void calc_runnable_avg_yN_inv(void)
printf("static const u32 runnable_avg_yN_inv[] = {");
for (i = 0; i < HALFLIFE; i++) {
- x = ((1UL<<32)-1)*pow(y, i);
+ x = ((1UL<<SHIFT)-1)*pow(y, i);
if (i % 6 == 0) printf("\n\t");
printf("0x%8x, ", x);
@@ -57,7 +57,7 @@ void calc_runnable_avg_yN_sum(void)
void calc_converged_max(void)
{
- long last = 0, y_inv = ((1UL<<32)-1)*y;
+ long last = 0, y_inv = ((1UL<<SHIFT)-1)*y;
for (; ; n++) {
if (n > -1)
--
1.9.1
reply other threads:[~2017-07-06 7:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1499327201-4805-1-git-send-email-opensource.ganesh@gmail.com \
--to=opensource.ganesh@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®