All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: [linux-next:master 2337/14229] drivers/reset/core-test.c:103:17: sparse: sparse: Initializer entry defined twice
Date: Thu, 03 Dec 2026 16:15:40 +0100	[thread overview]
Message-ID: <20261203161244.YSEznO2S-lkp@intel.com> (raw)

:::::: 
:::::: 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

                 reply	other threads:[~2026-12-03 15:16 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=20261203161244.YSEznO2S-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.