Re: [PATCH v3 3/3] overflow: Remove is_non_negative() and is_negative()

Nicolas Schier
2026-01-01T20:12:45Z

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

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@kernel.org>
> > Link: https://lore.kernel.org/all/aUT_yWin_xslnOFh@derry.ads.avm.de
> > Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
>
> So at the end, this patch got five kernel test robot reports:
>
> https://lore.kernel.org/all/202512221735.mRV4BZqB-lkp@intel.com/
> https://lore.kernel.org/all/202512230342.Lgha2HGH-lkp@intel.com/
> https://lore.kernel.org/all/202512251340.UApIFw9R-lkp@intel.com/
> https://lore.kernel.org/all/202512271618.33YepxDC-lkp@intel.com/
> https://lore.kernel.org/all/202512280906.wt7UNpya-lkp@intel.com/
>
> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]