[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E2A9A6AE-84F4-4C86-80CA-CC0C480FD9A8@toblux.com>
Date: Mon, 26 Feb 2024 09:27:18 +0100
From: Thorsten Blum <thorsten.blum@...lux.com>
To: "Liao, Chang" <liaochang1@...wei.com>
Cc: linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
John Stultz <jstultz@...gle.com>
Subject: Re: [PATCH] time: Use div64_long() instead of do_div()
> On Feb 26, 2024, at 04:28, Liao, Chang <liaochang1@...wei.com> wrote:
>
> I am considering using div64_ul() to calculate the result. as shift_hz is
> unsigned long, assume the sign bit of divisor cycles_per_tick never be set
> in this context,then div64_long() will do a extra sign extension for result.
Yes, div64_ul() is better and also removes the warning.
I'll submit a v2 shortly.
Thanks,
Thorsten
Powered by blists - more mailing lists