public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Qu Wenruo" <wqu@suse.com>, "Arnd Bergmann" <arnd@kernel.org>,
	"Chris Mason" <clm@fb.com>, "Josef Bacik" <josef@toxicpanda.com>,
	"David Sterba" <dsterba@suse.com>
Cc: "kernel test robot" <lkp@intel.com>,
	"Johannes Thumshirn" <johannes.thumshirn@wdc.com>,
	"Anand Jain" <anand.jain@oracle.com>,
	"Filipe Manana" <fdmanana@suse.com>,
	"Li Zetao" <lizetao1@huawei.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: use min_t() for mismatched type comparison
Date: Tue, 25 Feb 2025 22:28:49 +0100	[thread overview]
Message-ID: <d3917385-c852-490a-b600-7cb5d6d12465@app.fastmail.com> (raw)
In-Reply-To: <1cfc2f43-8ea4-4c39-b543-1f54ba9b284e@suse.com>

On Tue, Feb 25, 2025, at 22:22, Qu Wenruo wrote:
> 在 2025/2/26 06:14, Arnd Bergmann 写道:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> loff_t is a signed type, so using min() to compare it against a u64
>> causes a compiler warning:
>> 
>> fs/btrfs/extent_io.c:2497:13: error: call to '__compiletime_assert_728' declared with 'error' attribute: min(folio_pos(folio) + folio_size(folio) - 1, end) signedness error
>>   2497 |                 cur_end = min(folio_pos(folio) + folio_size(folio) - 1, end);
>>        |                           ^
>> 
>> Use min_t() instead.
>> 
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202502211908.aCcQQyEY-lkp@intel.com/
>> Fixes: aba063bf9336 ("btrfs: prepare extent_io.c for future larger folio support")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Thanks a lot, those fixes will be merged into the next version.
>
> For now the series is only for test purposes as there is a backlog of 
> subpage block size related patches pending.

Ok, thanks! Please double-check that the calculation in
patch 2/2 is actually correct though, as I wasn't entirely
sure about that part. 

     Arnd

  reply	other threads:[~2025-02-25 21:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25 19:44 [PATCH 1/2] btrfs: use min_t() for mismatched type comparison Arnd Bergmann
2025-02-25 19:44 ` [PATCH 2/2] btrfs: replace 64-bit division with a shift Arnd Bergmann
2025-02-25 21:22 ` [PATCH 1/2] btrfs: use min_t() for mismatched type comparison Qu Wenruo
2025-02-25 21:28   ` Arnd Bergmann [this message]
2025-02-26 14:13 ` David Laight

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=d3917385-c852-490a-b600-7cb5d6d12465@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=anand.jain@oracle.com \
    --cc=arnd@kernel.org \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizetao1@huawei.com \
    --cc=lkp@intel.com \
    --cc=wqu@suse.com \
    /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