All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/hv/mshv_debugfs.c:159:26: sparse: sparse: Initializer entry defined twice
@ 2026-12-03 17:44 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-12-03 17:44 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
CC: linux-kernel@vger.kernel.org
TO: Nuno Das Neves <nunodasneves@linux.microsoft.com>
CC: Wei Liu <wei.liu@kernel.org>
CC: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
CC: Praveen K Paladugu <prapal@linux.microsoft.com>
CC: Mukesh Rathor <mrathor@linux.microsoft.com>
CC: Purna Pavan Chandra Aekkaladevi <paekkaladevi@linux.microsoft.com>
CC: Jinank Jain <jinankjain@microsoft.com>
CC: Michael Kelley <mhklinux@outlook.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d06ce6f1eb5eeffd4ebcfde345dc34a98131d106
commit: ff225ba9ad71c4c5f900b9aa1b757adafcfb449d mshv: Add debugfs to view hypervisor statistics
date:   10 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 10 months ago
config: x86_64-randconfig-r2308-20261203 (https://download.01.org/0day-ci/archive/20261203/20261203183301.ik1VGDCV-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203183301.ik1VGDCV-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
| Fixes: ff225ba9ad71 ("mshv: Add debugfs to view hypervisor statistics")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/20261203183301.ik1VGDCV-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/hv/mshv_debugfs.c:159:26: sparse: sparse: Initializer entry defined twice
   drivers/hv/mshv_debugfs.c:159:26: sparse:   also defined here
   drivers/hv/mshv_debugfs.c:332:18: sparse: sparse: Initializer entry defined twice
   drivers/hv/mshv_debugfs.c:332:18: sparse:   also defined here
   drivers/hv/mshv_debugfs.c:475:18: sparse: sparse: Initializer entry defined twice
   drivers/hv/mshv_debugfs.c:475:18: sparse:   also defined here
   drivers/hv/mshv_debugfs.c:515:27: sparse: sparse: Initializer entry defined twice
   drivers/hv/mshv_debugfs.c:515:27: sparse:   also defined here

vim +159 drivers/hv/mshv_debugfs.c

ff225ba9ad71c4 Nuno Das Neves 2026-01-28  153  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  154  static int __init mshv_debugfs_lp_create(struct dentry *parent)
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  155  {
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  156  	struct dentry *lp_dir;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  157  	int err, lp_index;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  158  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28 @159  	mshv_lps_stats = kcalloc(mshv_lps_count,
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  160  				 sizeof(*mshv_lps_stats),
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  161  				 GFP_KERNEL_ACCOUNT);
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  162  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  163  	if (!mshv_lps_stats)
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  164  		return -ENOMEM;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  165  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  166  	lp_dir = debugfs_create_dir("lp", parent);
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  167  	if (IS_ERR(lp_dir)) {
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  168  		err = PTR_ERR(lp_dir);
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  169  		goto free_lp_stats;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  170  	}
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  171  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  172  	for (lp_index = 0; lp_index < mshv_lps_count; lp_index++) {
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  173  		err = lp_debugfs_create(lp_index, lp_dir);
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  174  		if (err)
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  175  			goto remove_debugfs_lps;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  176  	}
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  177  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  178  	mshv_debugfs_lp = lp_dir;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  179  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  180  	return 0;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  181  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  182  remove_debugfs_lps:
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  183  	for (lp_index -= 1; lp_index >= 0; lp_index--)
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  184  		mshv_lp_stats_unmap(lp_index);
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  185  	debugfs_remove_recursive(lp_dir);
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  186  free_lp_stats:
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  187  	kfree(mshv_lps_stats);
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  188  	mshv_lps_stats = NULL;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  189  
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  190  	return err;
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  191  }
ff225ba9ad71c4 Nuno Das Neves 2026-01-28  192  

-- 
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 17:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 17:44 drivers/hv/mshv_debugfs.c:159:26: 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.