Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932357AbcLHUwU (ORCPT ); Thu, 8 Dec 2016 15:52:20 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:47088 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753174AbcLHUwT (ORCPT ); Thu, 8 Dec 2016 15:52:19 -0500 Message-Id: <20161208204228.844699737@linutronix.de> User-Agent: quilt/0.63-1 Date: Thu, 08 Dec 2016 20:49:36 -0000 From: Thomas Gleixner To: LKML Cc: John Stultz , Peter Zijlstra , Ingo Molnar , David Gibson , Liav Rehana , Chris Metcalf , Richard Cochran , Parit Bhargava , Laurent Vivier , "Christopher S. Hall" Subject: [patch 3/6] timekeeping: Get rid of pointless typecasts References: <20161208202623.883855034@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=timekeeping--Get-rid-of-pointless-typecasts.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 905 Lines: 25 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 --- 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) {