Messages in this thread | | | Subject | Re: [PATCH] time: Use div64_long() instead of do_div() | From | Thorsten Blum <> | Date | Mon, 26 Feb 2024 09:27:18 +0100 |
| |
> On Feb 26, 2024, at 04:28, Liao, Chang <liaochang1@huawei.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
| |