Re: [PATCH v2 4/4] minmax: remove useless cast in __is_nonneg()

Vincent Mailhol <[email protected]> Sat, 20 Dec 2025 11:53:29 +0100
Newsgroups org.kernel.vger.linux-sparse,dev.linux.lists.llvm,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-hardening,org.kernel.vger.linux-kbuild,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 20/12/2025 at 11:02, David Laight wrote:
> On Fri, 19 Dec 2025 23:39:48 +0100
> Vincent Mailhol <[email protected]> wrote:
> 
>> The function like macro __is_nonneg() casts its argument to (long long)
>> in an attempt to silence -Wtype-limits warnings on unsigned values.
> 
> nak.
> 
> The cast is needed for pointer types, not for -Wtype-limits.
> which is why the '#if __SIZEOF_POINTER__ == __SIZEOF_LONG_LONG__'
> test is there.

OK. I will remove that fourth patch in v3.


Yours sincerely,
Vincent Mailhol