From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428AbcLHXrn (ORCPT ); Thu, 8 Dec 2016 18:47:43 -0500 Received: from ozlabs.org ([103.22.144.67]:37747 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443AbcLHXrl (ORCPT ); Thu, 8 Dec 2016 18:47:41 -0500 Date: Fri, 9 Dec 2016 10:40:22 +1100 From: David Gibson To: Thomas Gleixner Cc: LKML , John Stultz , Peter Zijlstra , Ingo Molnar , Liav Rehana , Chris Metcalf , Richard Cochran , Parit Bhargava , Laurent Vivier , "Christopher S. Hall" Subject: Re: [patch 3/6] timekeeping: Get rid of pointless typecasts Message-ID: <20161208234022.GL13139@umbus.fritz.box> References: <20161208202623.883855034@linutronix.de> <20161208204228.844699737@linutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="P9KQiUGMzYCFwWCN" Content-Disposition: inline In-Reply-To: <20161208204228.844699737@linutronix.de> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --P9KQiUGMzYCFwWCN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Thomas Gleixner Reviewed-by: David Gibson > --- > kernel/time/timekeeping.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > --- a/kernel/time/timekeeping.c > +++ b/kernel/time/timekeeping.c > @@ -258,10 +258,9 @@ static void tk_setup_internals(struct ti > tk->cycle_interval =3D interval; > =20 > /* Go back from cycles -> shifted ns */ > - tk->xtime_interval =3D (u64) interval * clock->mult; > + tk->xtime_interval =3D interval * clock->mult; > tk->xtime_remainder =3D ntpinterval - tk->xtime_interval; > - tk->raw_interval =3D > - ((u64) interval * clock->mult) >> clock->shift; > + tk->raw_interval =3D (interval * clock->mult) >> clock->shift; > =20 > /* if changing clocks, convert xtime_nsec shift units */ > if (old_clock) { >=20 >=20 --=20 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 --P9KQiUGMzYCFwWCN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYSe9lAAoJEGw4ysog2bOS3VAP/jGnccRY7TmPCjhMsA2wmEL4 ab5iTOQv1Oc+J3I5vYOtpu2whMWOGgs2m+YhbIi918c321c7i4bVBErhnq8D/A3P pev8JQZW9EkKq4z5aztajn2T37HxkMyqlysQLOz/zx+2HMWEAJBkXc+ibuRXQsqT yeYuD0gh39VL6iReXwsxt+peG8hh0Tu1njEjpjifT2kpaxYBPhRagly+TvNmL/Lu cdqPCh6YJTVH7HkpWonM+zCNaX/TzBQ5BC0xlWNASzG5JlWj2Qkp4s+hTd+TyqZw LiWjTNVwUvgeUWRLkeweWV4iez4rC3KvFIPqFiTSvTv2N7mVDi34c5LzRT+qH9jS q3d0O8VN7fHaLaoSWDO+T3VLVhGdQnN9N9zAvZrh7Fgutun7pmhA5CPO+rtX2rb3 +mcpPdqJWT0BGymU2fXtDwMDAefVLpRWfQXf0pZlxhOZAk9nlqJFoyUpAABU1as8 3A2YkrftY61E8AHjR1N15CN5mjaP/HyWg0S0XBnsb1l4094u41XV3ui5qGseNXld nAIEk9oBG+Uo90yfsKCYuRTBeWKpqb/zM1s+b6eOu1DtjKjAIBfWmJqktimAcUSH SfTWeqTYB/i/qBr+tHWY1dX2vjRXjkSILT1XWi+/VYflYlkklAo/uA4L7e57EK9f XBFogm7AnWnjSlIgsDEg =CFwk -----END PGP SIGNATURE----- --P9KQiUGMzYCFwWCN--