* [linux-next:master 2337/14229] drivers/reset/core-test.c:103:17: sparse: sparse: Initializer entry defined twice
@ 2026-12-03 15:15 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-12-03 15:15 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "sparse: Initializer entry defined twice"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: "Tzung-Bi Shih" <tzungbi@kernel.org>
CC: Philipp Zabel <p.zabel@pengutronix.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 799dd936553182df5770dde7f38d94c8337df75a
commit: db2f5f4ccc3df91ff1841bd8ed024beb42d2bc7a [2337/14229] reset: Add KUnit test cases
:::::: branch date: 24 hours ago
:::::: commit date: 4 weeks ago
config: i386-randconfig-2301-20261203 (https://download.01.org/0day-ci/archive/20261203/20261203161244.YSEznO2S-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203161244.YSEznO2S-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/20261203161244.YSEznO2S-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/reset/core-test.c:103:17: sparse: sparse: Initializer entry defined twice
drivers/reset/core-test.c:103:17: sparse: also defined here
vim +103 drivers/reset/core-test.c
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 91
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 92 static int reset_test_init(struct kunit *test)
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 93 {
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 94 static const struct property_entry supp_props[] = {
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 95 PROPERTY_ENTRY_U32("#reset-cells", 1),
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 96 {}
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 97 };
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 98 static const struct software_node supp_swnode = {
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 99 .name = "reset-test-supplier",
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 100 .properties = supp_props,
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 101 };
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 102 static const struct software_node_ref_args refs[] = {
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 @103 SOFTWARE_NODE_REFERENCE(&supp_swnode, 0),
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 104 };
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 105 static const struct property_entry cons_props[] = {
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 106 PROPERTY_ENTRY_REF_ARRAY("resets", refs),
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 107 {}
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 108 };
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 109
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 110 struct reset_test_context *ctx;
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 111 int ret;
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 112
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 113 ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 114 KUNIT_ASSERT_NOT_NULL(test, ctx);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 115 test->priv = ctx;
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 116
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 117 ctx->supp_fwnode = kunit_software_node_register(test, &supp_swnode);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 118 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ctx->supp_fwnode);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 119
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 120 ctx->cons_fwnode = kunit_fwnode_create_software_node(test, cons_props,
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 121 NULL);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 122 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ctx->cons_fwnode);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 123
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 124 ctx->rcdev.ops = &reset_test_ops;
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 125 ctx->rcdev.nr_resets = 1;
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 126 ctx->rcdev.fwnode = ctx->supp_fwnode;
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 127
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 128 ret = reset_controller_register(&ctx->rcdev);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 129 KUNIT_ASSERT_EQ(test, ret, 0);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 130 ctx->rcdev_registered = true;
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 131
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 132 ctx->rstc = __fwnode_reset_control_get(ctx->cons_fwnode, NULL, 0,
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 133 RESET_CONTROL_EXCLUSIVE);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 134 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ctx->rstc);
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 135
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 136 return 0;
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 137 }
db2f5f4ccc3df91 Tzung-Bi Shih 2026-11-05 138
--
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-12-03 15:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 15:15 [linux-next:master 2337/14229] drivers/reset/core-test.c:103:17: sparse: sparse: Initializer entry defined twice 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.