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

> On Feb 29, 2024, at 20:41, Thorsten Blum <thorsten.blum@toblux.com> wrote:
>
>> On Feb 29, 2024, at 19:45, Ryusuke Konishi <konishi.ryusuke@gmail.com> wrote:
>>
>> All of the fixes in this patch seem to be correct, but this doesn't
>> cover nilfs_resize_fs(), nilfs_max_segment_count(), and
>> nilfs_sb2_bad_offset(), which also have do_div() that doesn't use the
>> return value.
>
> For nilfs_sb2_bad_offset(), where the dividend is u64 and the divisor is u32, we
> would need a dedicated function like div64_u32() that doesn't calculate the
> remainder, which doesn't seem to exist. What do you think?

Never mind, there is div_u64(u64, u32). I'll submit a v2 shortly.

Thorsten
\
 
 \ /
  Last update: 2024-05-27 15:28    [W:0.074 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site