Linux NILFS development
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@toblux.com>
To: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nilfs2: Use div64_ul() instead of do_div()
Date: Thu, 29 Feb 2024 22:14:48 +0100	[thread overview]
Message-ID: <215C3176-D6E5-47CF-BC48-7A75CF75CE3F@toblux.com> (raw)
In-Reply-To: <BFEA2A31-3147-49EF-A9BE-592C90E783DD@toblux.com>


> On Feb 29, 2024, at 21:40, Thorsten Blum <thorsten.blum@toblux.com> wrote:
> 
>> 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.

I left nilfs_sb2_bad_offset() unchanged in v2 because div_u64() still calculates
the remainder.

Thorsten

  parent reply	other threads:[~2024-02-29 21:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 12:16 [PATCH] nilfs2: Use div64_ul() instead of do_div() Thorsten Blum
2024-02-29 18:45 ` Ryusuke Konishi
2024-02-29 19:41   ` Thorsten Blum
2024-02-29 20:40     ` Thorsten Blum
2024-02-29 21:04       ` [PATCH v2] " Thorsten Blum
2024-02-29 21:14       ` Thorsten Blum [this message]
2024-03-06 14:45         ` [PATCH] " Ryusuke Konishi
  -- strict thread matches above, loose matches on Subject: below --
2024-03-06 14:25 Ryusuke Konishi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=215C3176-D6E5-47CF-BC48-7A75CF75CE3F@toblux.com \
    --to=thorsten.blum@toblux.com \
    --cc=konishi.ryusuke@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nilfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox