From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero?
Date: Tue, 23 Jun 2026 06:49:19 +0800 [thread overview]
Message-ID: <202606230635.y5IGABMC-lkp@intel.com> (raw)
::::::
:::::: 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
next reply other threads:[~2026-06-22 22:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 22:49 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-10 21:17 lib/kunit/test.c:857:34: sparse: sparse: unsigned value that used to be signed checked against zero? kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202606230635.y5IGABMC-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.