All of lore.kernel.org
 help / color / mirror / Atom feed
* lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero?
@ 2026-04-10 21:17 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-04-10 21:17 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero?"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
CC: Daniel Gomez <da.gomez@samsung.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7c6c4ed80b874f721bc7c2c937e098c56e37d2f0
commit: 768da2eae8662ca51102794c32d37c17410acbf5 kunit: test: Drop CONFIG_MODULE ifdeffery
date:   8 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 8 months ago
config: m68k-randconfig-r112-20260410 (https://download.01.org/0day-ci/archive/20260411/202604110554.fnUWTIxa-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260411/202604110554.fnUWTIxa-lkp@intel.com/reproduce)

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
| Fixes: 768da2eae866 ("kunit: test: Drop CONFIG_MODULE ifdeffery")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202604110554.fnUWTIxa-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero?
   lib/kunit/test.c:848:17: sparse: signed value source

vim +857 lib/kunit/test.c

3d6e44623841c8b Jeremy Kerr        2022-07-09  844  
3d6e44623841c8b Jeremy Kerr        2022-07-09  845  static void kunit_module_exit(struct module *mod)
3d6e44623841c8b Jeremy Kerr        2022-07-09  846  {
b67abaad4d25b5d Janusz Krzysztofik 2023-08-07  847  	struct kunit_suite_set suite_set = {
b67abaad4d25b5d Janusz Krzysztofik 2023-08-07  848  		mod->kunit_suites, mod->kunit_suites + mod->num_kunit_suites,
b67abaad4d25b5d Janusz Krzysztofik 2023-08-07  849  	};
18258c60f8a74b9 Janusz Krzysztofik 2023-08-07  850  	const char *action = kunit_action();
18258c60f8a74b9 Janusz Krzysztofik 2023-08-07  851  
a1af6a2bfa0cb46 Marco Pagani       2024-01-10  852  	/*
a1af6a2bfa0cb46 Marco Pagani       2024-01-10  853  	 * Check if the start address is a valid virtual address to detect
a1af6a2bfa0cb46 Marco Pagani       2024-01-10  854  	 * if the module load sequence has failed and the suite set has not
a1af6a2bfa0cb46 Marco Pagani       2024-01-10  855  	 * been initialized and filtered.
a1af6a2bfa0cb46 Marco Pagani       2024-01-10  856  	 */
a1af6a2bfa0cb46 Marco Pagani       2024-01-10 @857  	if (!suite_set.start || !virt_addr_valid(suite_set.start))
a1af6a2bfa0cb46 Marco Pagani       2024-01-10  858  		return;
a1af6a2bfa0cb46 Marco Pagani       2024-01-10  859  
18258c60f8a74b9 Janusz Krzysztofik 2023-08-07  860  	if (!action)
18258c60f8a74b9 Janusz Krzysztofik 2023-08-07  861  		__kunit_test_suites_exit(mod->kunit_suites,
18258c60f8a74b9 Janusz Krzysztofik 2023-08-07  862  					 mod->num_kunit_suites);
b67abaad4d25b5d Janusz Krzysztofik 2023-08-07  863  
b67abaad4d25b5d Janusz Krzysztofik 2023-08-07  864  	kunit_free_suite_set(suite_set);
3d6e44623841c8b Jeremy Kerr        2022-07-09  865  }
3d6e44623841c8b Jeremy Kerr        2022-07-09  866  

:::::: The code at line 857 was first introduced by commit
:::::: a1af6a2bfa0cb46d70b7df5352993e750da6c79b kunit: run test suites only after module initialization completes

:::::: TO: Marco Pagani <marpagan@redhat.com>
:::::: CC: Shuah Khan <skhan@linuxfoundation.org>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero?
@ 2026-06-22 22:49 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-06-22 22:49 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence static check warning: lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero?"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
CC: Daniel Gomez <da.gomez@samsung.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4708cac0e22cfd217f48f7cec3c35e5922efcccd
commit: 768da2eae8662ca51102794c32d37c17410acbf5 kunit: test: Drop CONFIG_MODULE ifdeffery
date:   11 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 11 months ago
config: m68k-randconfig-r132-20260623 (https://download.01.org/0day-ci/archive/20260623/202606230635.y5IGABMC-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260623/202606230635.y5IGABMC-lkp@intel.com/reproduce)

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
| Fixes: 768da2eae866 ("kunit: test: Drop CONFIG_MODULE ifdeffery")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202606230635.y5IGABMC-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero?
   lib/kunit/test.c:848:17: sparse: signed value source

vim +857 lib/kunit/test.c

3d6e44623841c8 Jeremy Kerr        2022-07-09  844  
3d6e44623841c8 Jeremy Kerr        2022-07-09  845  static void kunit_module_exit(struct module *mod)
3d6e44623841c8 Jeremy Kerr        2022-07-09  846  {
b67abaad4d25b5 Janusz Krzysztofik 2023-08-07  847  	struct kunit_suite_set suite_set = {
b67abaad4d25b5 Janusz Krzysztofik 2023-08-07  848  		mod->kunit_suites, mod->kunit_suites + mod->num_kunit_suites,
b67abaad4d25b5 Janusz Krzysztofik 2023-08-07  849  	};
18258c60f8a74b Janusz Krzysztofik 2023-08-07  850  	const char *action = kunit_action();
18258c60f8a74b Janusz Krzysztofik 2023-08-07  851  
a1af6a2bfa0cb4 Marco Pagani       2024-01-10  852  	/*
a1af6a2bfa0cb4 Marco Pagani       2024-01-10  853  	 * Check if the start address is a valid virtual address to detect
a1af6a2bfa0cb4 Marco Pagani       2024-01-10  854  	 * if the module load sequence has failed and the suite set has not
a1af6a2bfa0cb4 Marco Pagani       2024-01-10  855  	 * been initialized and filtered.
a1af6a2bfa0cb4 Marco Pagani       2024-01-10  856  	 */
a1af6a2bfa0cb4 Marco Pagani       2024-01-10 @857  	if (!suite_set.start || !virt_addr_valid(suite_set.start))
a1af6a2bfa0cb4 Marco Pagani       2024-01-10  858  		return;
a1af6a2bfa0cb4 Marco Pagani       2024-01-10  859  
18258c60f8a74b Janusz Krzysztofik 2023-08-07  860  	if (!action)
18258c60f8a74b Janusz Krzysztofik 2023-08-07  861  		__kunit_test_suites_exit(mod->kunit_suites,
18258c60f8a74b Janusz Krzysztofik 2023-08-07  862  					 mod->num_kunit_suites);
b67abaad4d25b5 Janusz Krzysztofik 2023-08-07  863  
b67abaad4d25b5 Janusz Krzysztofik 2023-08-07  864  	kunit_free_suite_set(suite_set);
3d6e44623841c8 Jeremy Kerr        2022-07-09  865  }
3d6e44623841c8 Jeremy Kerr        2022-07-09  866  

:::::: The code at line 857 was first introduced by commit
:::::: a1af6a2bfa0cb46d70b7df5352993e750da6c79b kunit: run test suites only after module initialization completes

:::::: TO: Marco Pagani <marpagan@redhat.com>
:::::: CC: Shuah Khan <skhan@linuxfoundation.org>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-22 22:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 22:49 lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero? kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-04-10 21:17 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.