All of lore.kernel.org
 help / color / mirror / Atom feed
* lib/tests/cmdline_kunit.c:247:24-32: WARNING: opportunity for ARRAY_END
@ 2026-11-14  6:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-14  6:31 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Julia Lawall

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Dmitry Antipov <dmantipov@yandex.ru>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Andy Shevchenko <andriy.shevchenko@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   97d73c8251226cf27cc6656b4c542869bb8c69fa
commit: a535853b664988aba11771deed44673765df581e lib/cmdline_kunit: add test case for memparse()
date:   6 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 6 months ago
config: um-randconfig-r2101-20261114 (https://download.01.org/0day-ci/archive/20261114/202611140740.VQJM8fbB-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 8621950157210c1fa68f20f0614cb51310ec9dff)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)

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: a535853b6649 ("lib/cmdline_kunit: add test case for memparse()")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202611140740.VQJM8fbB-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> lib/tests/cmdline_kunit.c:247:24-32: WARNING: opportunity for ARRAY_END

vim +247 lib/tests/cmdline_kunit.c

a535853b664988 Dmitry Antipov 2026-05-19  240  
a535853b664988 Dmitry Antipov 2026-05-19  241  static void cmdline_test_memparse(struct kunit *test)
a535853b664988 Dmitry Antipov 2026-05-19  242  {
a535853b664988 Dmitry Antipov 2026-05-19  243  	const struct cmdline_test_memparse_entry *e;
a535853b664988 Dmitry Antipov 2026-05-19  244  	unsigned long long ret;
a535853b664988 Dmitry Antipov 2026-05-19  245  	char *retptr;
a535853b664988 Dmitry Antipov 2026-05-19  246  
a535853b664988 Dmitry Antipov 2026-05-19 @247  	for (e = testdata; e < testdata + ARRAY_SIZE(testdata); e++) {
a535853b664988 Dmitry Antipov 2026-05-19  248  		ret = memparse(e->input, &retptr);
a535853b664988 Dmitry Antipov 2026-05-19  249  		KUNIT_EXPECT_EQ_MSG(test, ret, e->result,
a535853b664988 Dmitry Antipov 2026-05-19  250  				    "    when parsing '%s'", e->input);
a535853b664988 Dmitry Antipov 2026-05-19  251  		KUNIT_EXPECT_EQ_MSG(test, *retptr, *e->unrecognized,
a535853b664988 Dmitry Antipov 2026-05-19  252  				    "    when parsing '%s'", e->input);
a535853b664988 Dmitry Antipov 2026-05-19  253  	}
a535853b664988 Dmitry Antipov 2026-05-19  254  }
a535853b664988 Dmitry Antipov 2026-05-19  255  

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-14  6:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-14  6:31 lib/tests/cmdline_kunit.c:247:24-32: WARNING: opportunity for ARRAY_END 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.