[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d3917385-c852-490a-b600-7cb5d6d12465@app.fastmail.com>
Date: Tue, 25 Feb 2025 22:28:49 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Qu Wenruo" <wqu@...e.com>, "Arnd Bergmann" <arnd@...nel.org>,
"Chris Mason" <clm@...com>, "Josef Bacik" <josef@...icpanda.com>,
"David Sterba" <dsterba@...e.com>
Cc: "kernel test robot" <lkp@...el.com>,
"Johannes Thumshirn" <johannes.thumshirn@....com>,
"Anand Jain" <anand.jain@...cle.com>, "Filipe Manana" <fdmanana@...e.com>,
"Li Zetao" <lizetao1@...wei.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] btrfs: use min_t() for mismatched type comparison
On Tue, Feb 25, 2025, at 22:22, Qu Wenruo wrote:
> 在 2025/2/26 06:14, Arnd Bergmann 写道:
>> From: Arnd Bergmann <arnd@...db.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@...el.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@...db.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
Powered by blists - more mailing lists