* [linux-next:master 1626/5095] drivers/gpu/drm/xe/tests/xe_args_test.c:225 if_args_test() warn: if();
@ 2026-01-11 6:17 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-01-11 6:17 UTC (permalink / raw)
To: Michal Wajdeczko; +Cc: oe-kbuild-all, Daniele Ceraolo Spurio
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f417b7ffcbef7d76b0d8860518f50dae0e7e5eda
commit: ce5971773651ad5c7e26aea29d72ea8887428774 [1626/5095] drm/xe: Introduce IF_ARGS macro utility
config: s390-randconfig-r072-20260109 (https://download.01.org/0day-ci/archive/20260111/202601111420.alodw392-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
smatch version: v0.5.0-8985-g2614ff1a
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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601111420.alodw392-lkp@intel.com/
New smatch warnings:
drivers/gpu/drm/xe/tests/xe_args_test.c:225 if_args_test() warn: if();
Old smatch warnings:
drivers/gpu/drm/xe/tests/xe_args_test.c:226 if_args_test() warn: if();
drivers/gpu/drm/xe/tests/xe_args_test.c:228 if_args_test() warn: if();
drivers/gpu/drm/xe/tests/xe_args_test.c:229 if_args_test() warn: if();
vim +225 drivers/gpu/drm/xe/tests/xe_args_test.c
218
219 static void if_args_test(struct kunit *test)
220 {
221 bool with_args = true;
222 bool no_args = false;
223 enum { X = 100 };
224
> 225 KUNIT_EXPECT_TRUE(test, IF_ARGS(true, false, FOO_ARGS));
226 KUNIT_EXPECT_FALSE(test, IF_ARGS(true, false, NO_ARGS));
227
228 KUNIT_EXPECT_TRUE(test, CONCATENATE(IF_ARGS(with, no, FOO_ARGS), _args));
229 KUNIT_EXPECT_FALSE(test, CONCATENATE(IF_ARGS(with, no, NO_ARGS), _args));
230
231 KUNIT_EXPECT_STREQ(test, __stringify(IF_ARGS(yes, no, FOO_ARGS)), "yes");
232 KUNIT_EXPECT_STREQ(test, __stringify(IF_ARGS(yes, no, NO_ARGS)), "no");
233
234 KUNIT_EXPECT_EQ(test, IF_ARGS(CALL_ARGS(COUNT_ARGS, FOO_ARGS), -1, FOO_ARGS), 4);
235 KUNIT_EXPECT_EQ(test, IF_ARGS(CALL_ARGS(COUNT_ARGS, FOO_ARGS), -1, NO_ARGS), -1);
236 KUNIT_EXPECT_EQ(test, IF_ARGS(CALL_ARGS(COUNT_ARGS, NO_ARGS), -1, FOO_ARGS), 0);
237 KUNIT_EXPECT_EQ(test, IF_ARGS(CALL_ARGS(COUNT_ARGS, NO_ARGS), -1, NO_ARGS), -1);
238
239 KUNIT_EXPECT_EQ(test,
240 CALL_ARGS(FIRST_ARG,
241 CALL_ARGS(CONCATENATE, IF_ARGS(FOO, MAX, FOO_ARGS), _ARGS)), X);
242 KUNIT_EXPECT_EQ(test,
243 CALL_ARGS(FIRST_ARG,
244 CALL_ARGS(CONCATENATE, IF_ARGS(FOO, MAX, NO_ARGS), _ARGS)), -1);
245 KUNIT_EXPECT_EQ(test,
246 CALL_ARGS(COUNT_ARGS,
247 CALL_ARGS(CONCATENATE, IF_ARGS(FOO, MAX, FOO_ARGS), _ARGS)), 4);
248 KUNIT_EXPECT_EQ(test,
249 CALL_ARGS(COUNT_ARGS,
250 CALL_ARGS(CONCATENATE, IF_ARGS(FOO, MAX, NO_ARGS), _ARGS)), 12);
251 }
252
--
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-01-11 6:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11 6:17 [linux-next:master 1626/5095] drivers/gpu/drm/xe/tests/xe_args_test.c:225 if_args_test() warn: if(); 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.