From: kernel test robot <lkp@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Subject: [linux-next:master 1626/5095] drivers/gpu/drm/xe/tests/xe_args_test.c:225 if_args_test() warn: if();
Date: Sun, 11 Jan 2026 14:17:24 +0800 [thread overview]
Message-ID: <202601111420.alodw392-lkp@intel.com> (raw)
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
reply other threads:[~2026-01-11 6:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202601111420.alodw392-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=oe-kbuild-all@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.