diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-12-08 15:49:36 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-12-09 06:06:42 -0500 |
commit | cbd99e3b289e43000c29aa4aa9b94b394cdc68bd (patch) | |
tree | 8524ff43afb1e0ff0a910b141fd7e7a915f548d3 /kernel/time | |
parent | acc89612a70e370a5640fd77a83f15b7b94d85e4 (diff) |
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@linutronix.de>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Parit Bhargava <prarit@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>
Cc: "Christopher S. Hall" <christopher.s.hall@intel.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Liav Rehana <liavr@mellanox.com>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/20161208204228.844699737@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/timekeeping.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 5244821643a4..82e1b5cbebbb 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) | |||
258 | tk->cycle_interval = interval; | 258 | tk->cycle_interval = interval; |
259 | 259 | ||
260 | /* Go back from cycles -> shifted ns */ | 260 | /* Go back from cycles -> shifted ns */ |
261 | tk->xtime_interval = (u64) interval * clock->mult; | 261 | tk->xtime_interval = interval * clock->mult; |
262 | tk->xtime_remainder = ntpinterval - tk->xtime_interval; | 262 | tk->xtime_remainder = ntpinterval - tk->xtime_interval; |
263 | tk->raw_interval = | 263 | tk->raw_interval = (interval * clock->mult) >> clock->shift; |
264 | ((u64) interval * clock->mult) >> clock->shift; | ||
265 | 264 | ||
266 | /* if changing clocks, convert xtime_nsec shift units */ | 265 | /* if changing clocks, convert xtime_nsec shift units */ |
267 | if (old_clock) { | 266 | if (old_clock) { |