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

kernel test robot <[email protected]> Thu, 25 Dec 2025 14:04:28 +0800
Newsgroups org.kernel.vger.linux-sparse,dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all,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]>
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: i386-randconfig-141-20251225 (https://download.01.org/0day-ci/archive/20251225/[email protected]/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

smatch warnings:
drivers/md/dm-stripe.c:463 stripe_io_hints() warn: unsigned '*_d' is never less than zero.
drivers/md/dm-stripe.c:463 stripe_io_hints() warn: unsigned '_a' is never less than zero.

vim +463 drivers/md/dm-stripe.c

af4874e03ed82f Mike Snitzer    2009-06-22  454  
40bea431274c24 Mike Snitzer    2009-09-04  455  static void stripe_io_hints(struct dm_target *ti,
40bea431274c24 Mike Snitzer    2009-09-04  456  			    struct queue_limits *limits)
40bea431274c24 Mike Snitzer    2009-09-04  457  {
40bea431274c24 Mike Snitzer    2009-09-04  458  	struct stripe_c *sc = ti->private;
1071d560afb4c2 Mikulas Patocka 2025-08-11  459  	unsigned int io_min, io_opt;
40bea431274c24 Mike Snitzer    2009-09-04  460  
5fb9d4341b782a John Garry      2025-07-11  461  	limits->chunk_sectors = sc->chunk_size;
1071d560afb4c2 Mikulas Patocka 2025-08-11  462  
1071d560afb4c2 Mikulas Patocka 2025-08-11 @463  	if (!check_shl_overflow(sc->chunk_size, SECTOR_SHIFT, &io_min) &&
1071d560afb4c2 Mikulas Patocka 2025-08-11  464  	    !check_mul_overflow(io_min, sc->stripes, &io_opt)) {
1071d560afb4c2 Mikulas Patocka 2025-08-11  465  		limits->io_min = io_min;
1071d560afb4c2 Mikulas Patocka 2025-08-11  466  		limits->io_opt = io_opt;
1071d560afb4c2 Mikulas Patocka 2025-08-11  467  	}
40bea431274c24 Mike Snitzer    2009-09-04  468  }
40bea431274c24 Mike Snitzer    2009-09-04  469  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki