From: tip-bot for Nicholas Mc Guire <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, der.herr@hofr.at, john.stultz@linaro.org,
mingo@kernel.org, christopher.s.hall@intel.com, hpa@zytor.com,
linux-kernel@vger.kernel.org
Subject: [tip:timers/core] timekeeping: Remove pointless conversion to bool
Date: Fri, 31 Mar 2017 01:30:49 -0700 [thread overview]
Message-ID: <tip-5fc63f9577322d11019b6d357f73f5ce9031f263@git.kernel.org> (raw)
In-Reply-To: <1490382215-30505-1-git-send-email-der.herr@hofr.at>
Commit-ID: 5fc63f9577322d11019b6d357f73f5ce9031f263
Gitweb: http://git.kernel.org/tip/5fc63f9577322d11019b6d357f73f5ce9031f263
Author: Nicholas Mc Guire <der.herr@hofr.at>
AuthorDate: Fri, 24 Mar 2017 20:03:35 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 31 Mar 2017 10:26:56 +0200
timekeeping: Remove pointless conversion to bool
interp_forward is type bool so assignment from a logical operation directly
is sufficient.
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Cc: "Christopher S. Hall" <christopher.s.hall@intel.com>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/1490382215-30505-1-git-send-email-der.herr@hofr.at
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/timekeeping.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 5b63a21..9652bc5 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -996,8 +996,7 @@ static int adjust_historical_crosststamp(struct system_time_snapshot *history,
return 0;
/* Interpolate shortest distance from beginning or end of history */
- interp_forward = partial_history_cycles > total_history_cycles/2 ?
- true : false;
+ interp_forward = partial_history_cycles > total_history_cycles / 2;
partial_history_cycles = interp_forward ?
total_history_cycles - partial_history_cycles :
partial_history_cycles;
prev parent reply other threads:[~2017-03-31 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 19:03 [PATCH] timekeeping: no conversion to bool needed Nicholas Mc Guire
2017-03-31 8:30 ` tip-bot for Nicholas Mc Guire [this message]
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=tip-5fc63f9577322d11019b6d357f73f5ce9031f263@git.kernel.org \
--to=tipbot@zytor.com \
--cc=christopher.s.hall@intel.com \
--cc=der.herr@hofr.at \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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