lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-cbd99e3b289e43000c29aa4aa9b94b394cdc68bd@git.kernel.org>
Date:   Fri, 9 Dec 2016 03:14:17 -0800
From:   tip-bot for Thomas Gleixner <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     prarit@...hat.com, liavr@...lanox.com, john.stultz@...aro.org,
        cmetcalf@...lanox.com, lvivier@...hat.com, tglx@...utronix.de,
        david@...son.dropbear.id.au, linux-kernel@...r.kernel.org,
        christopher.s.hall@...el.com, peterz@...radead.org,
        richardcochran@...il.com, mingo@...nel.org, hpa@...or.com
Subject: [tip:timers/core] timekeeping: Get rid of pointless typecasts

Commit-ID:  cbd99e3b289e43000c29aa4aa9b94b394cdc68bd
Gitweb:     http://git.kernel.org/tip/cbd99e3b289e43000c29aa4aa9b94b394cdc68bd
Author:     Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Thu, 8 Dec 2016 20:49:36 +0000
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 9 Dec 2016 12:06:42 +0100

timekeeping: Get rid of pointless typecasts

cycle_t is defined as u64, so casting it to u64 is a pointless and
confusing exercise. cycle_t should simply go away and be replaced with a
plain u64 to avoid further confusion.

Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: David Gibson <david@...son.dropbear.id.au>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Parit Bhargava <prarit@...hat.com>
Cc: Laurent Vivier <lvivier@...hat.com>
Cc: "Christopher S. Hall" <christopher.s.hall@...el.com>
Cc: Chris Metcalf <cmetcalf@...lanox.com>
Cc: Richard Cochran <richardcochran@...il.com>
Cc: Liav Rehana <liavr@...lanox.com>
Cc: John Stultz <john.stultz@...aro.org>
Link: http://lkml.kernel.org/r/20161208204228.844699737@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

---
 kernel/time/timekeeping.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 5244821..82e1b5c 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -258,10 +258,9 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
 	tk->cycle_interval = interval;
 
 	/* Go back from cycles -> shifted ns */
-	tk->xtime_interval = (u64) interval * clock->mult;
+	tk->xtime_interval = interval * clock->mult;
 	tk->xtime_remainder = ntpinterval - tk->xtime_interval;
-	tk->raw_interval =
-		((u64) interval * clock->mult) >> clock->shift;
+	tk->raw_interval = (interval * clock->mult) >> clock->shift;
 
 	 /* if changing clocks, convert xtime_nsec shift units */
 	if (old_clock) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ