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

From: Vincent Mailhol

Date: Mon Dec 22 2025 - 13:39:20 EST


On 22/12/2025 at 11:03, kernel test robot wrote:
> Hi Vincent,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on 3e7f562e20ee87a25e104ef4fce557d39d62fa85]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Vincent-Mailhol/kbuild-remove-gcc-s-Wtype-limits/20251220-190509
> base: 3e7f562e20ee87a25e104ef4fce557d39d62fa85
> patch link: https://lore.kernel.org/r/20251220-remove_wtype-limits-v3-3-24b170af700e%40kernel.org
> patch subject: [PATCH v3 3/3] overflow: Remove is_non_negative() and is_negative()
> config: x86_64-randconfig-161-20251222 (https://download.01.org/0day-ci/archive/20251222/202512221735.mRV4BZqB-lkp@xxxxxxxxx/config)
> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202512221735.mRV4BZqB-lkp@xxxxxxxxx/
>
> smatch warnings:
> fs/libfs.c:1628 generic_check_addressable() warn: unsigned '*_d' is never less than zero.
> fs/libfs.c:1628 generic_check_addressable() warn: unsigned '_a' is never less than zero.
> mm/vmalloc.c:4708 remap_vmalloc_range_partial() warn: unsigned '*_d' is never less than zero.
> mm/vmalloc.c:4708 remap_vmalloc_range_partial() warn: unsigned '_a' is never less than zero.

So smatch is not able to distinguish when the comparison comes from
a macro expansion.

Can this warning be ignored? Or should I remove this 3rd patch from
the series (and go back to v1)? My choice would be to ignore this
warning.


Yours sincerely,
Vincent Mailhol