lkml.org 
[lkml]   [2016]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 3/6] timekeeping: Get rid of pointless typecasts
On Thu, Dec 08, 2016 at 08:49:36PM -0000, Thomas Gleixner wrote:
> cycles_t is defined as u64, so casting it to u64 is a pointless and
> confusing exercise. cycles_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>

> ---
> kernel/time/timekeeping.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -258,10 +258,9 @@ static void tk_setup_internals(struct ti
> 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) {
>
>

--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-12-09 00:48    [W:0.196 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site