lkml.org 
[lkml]   [2024]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] time: Use div64_long() instead of do_div()
From
Date

> 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
\
 
 \ /
  Last update: 2024-05-27 15:21    [W:0.083 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site