Re: [PATCH v3 3/3] overflow: Remove is_non_negative() and is_negative()
From: Nicolas Schier
Date: Thu Jan 01 2026 - 15:13:03 EST
On Thu, Jan 01, 2026 at 04:10:36PM +0100, Vincent Mailhol wrote:
> On 20/12/2025 at 12:02, Vincent Mailhol wrote:
> > The is_non_negative() and is_negative() function-like macros just
> > exist as a workaround to silence the -Wtype-limits warning. Now that
> > this warning is disabled, those two macros have lost their raison
> > d'être. Remove them.
> >
> > This reverts commit dc7fe518b049 ("overflow: Fix -Wtype-limits
> > compilation warnings").
> >
> > Suggested-by: Nicolas Schier <nsc@xxxxxxxxxx>
> > Link: https://lore.kernel.org/all/aUT_yWin_xslnOFh@xxxxxxxxxxxxxxxx
> > Signed-off-by: Vincent Mailhol <mailhol@xxxxxxxxxx>
>
> So at the end, this patch got five kernel test robot reports:
>
> https://lore.kernel.org/all/202512221735.mRV4BZqB-lkp@xxxxxxxxx/
> https://lore.kernel.org/all/202512230342.Lgha2HGH-lkp@xxxxxxxxx/
> https://lore.kernel.org/all/202512251340.UApIFw9R-lkp@xxxxxxxxx/
> https://lore.kernel.org/all/202512271618.33YepxDC-lkp@xxxxxxxxx/
> https://lore.kernel.org/all/202512280906.wt7UNpya-lkp@xxxxxxxxx/
>
> All these are the same smatch warning just triggered from a different
> place. I think it is still too early to undo that workaround in
> include/linux/overflow.h, otherwise developers would be getting that
> smatch report too often.
>
> I will send a v4 in which I will drop this patch. This basically means
> that the v4 is a revert to v1...
thanks! I think it's a bit sad to keep code only to make some checker
tooling happy, but for now it seems to be the right thing to do.
Kind Regards,
Nicolas
Attachment:
signature.asc
Description: PGP signature