Skip to content

Commit cbd99e3

Browse files
committed
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>
1 parent acc8961 commit cbd99e3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎kernel/time/timekeeping.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,9 @@ static void tk_setup_internals(struct timekeeper *tk, struct clocksource *clock)
258258
tk->cycle_interval = interval;
259259

260260
/* Go back from cycles -> shifted ns */
261-
tk->xtime_interval = (u64) interval * clock->mult;
261+
tk->xtime_interval = interval * clock->mult;
262262
tk->xtime_remainder = ntpinterval - tk->xtime_interval;
263-
tk->raw_interval =
264-
((u64) interval * clock->mult) >> clock->shift;
263+
tk->raw_interval = (interval * clock->mult) >> clock->shift;
265264

266265
/* if changing clocks, convert xtime_nsec shift units */
267266
if (old_clock) {

0 commit comments

Comments
 (0)