Re: [PATCH v11 04/14] cxl/mbox: Add GET_SUPPORTED_FEATURES mailbox command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ras/edac-for-next]
[also build test WARNING on rafael-pm/linux-next rafael-pm/bleeding-edge cxl/next linus/master v6.11-rc3 next-20240816]
[cannot apply to cxl/pending]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/shiju-jose-huawei-com/EDAC-Add-support-for-EDAC-device-feature-s-control/20240817-004442
base:   https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next
patch link:    https://lore.kernel.org/r/20240816164238.1902-5-shiju.jose%40huawei.com
patch subject: [PATCH v11 04/14] cxl/mbox: Add GET_SUPPORTED_FEATURES mailbox command
config: alpha-randconfig-r131-20240818 (https://download.01.org/0day-ci/archive/20240819/202408190510.dFXq1LrX-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 13.3.0
reproduce: (https://download.01.org/0day-ci/archive/20240819/202408190510.dFXq1LrX-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408190510.dFXq1LrX-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/cxl/core/mbox.c:1377:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected int nentries @@     got restricted __le16 [usertype] nr_entries @@
   drivers/cxl/core/mbox.c:1377:26: sparse:     expected int nentries
   drivers/cxl/core/mbox.c:1377:26: sparse:     got restricted __le16 [usertype] nr_entries

vim +1377 drivers/cxl/core/mbox.c

  1353	
  1354	int cxl_get_supported_feature_entry(struct cxl_memdev_state *mds, const uuid_t *feat_uuid,
  1355					    struct cxl_mbox_supp_feat_entry *feat_entry_out)
  1356	{
  1357		struct cxl_mbox_supp_feat_entry *feat_entry;
  1358		int feat_index, feats_out_size;
  1359		int nentries, count;
  1360		int ret;
  1361	
  1362		feat_index = 0;
  1363		feats_out_size = sizeof(struct cxl_mbox_get_supp_feats_out) +
  1364					sizeof(struct cxl_mbox_supp_feat_entry);
  1365		struct cxl_mbox_get_supp_feats_out *feats_out __free(kfree) =
  1366						kmalloc(feats_out_size, GFP_KERNEL);
  1367		if (!feats_out)
  1368			return -ENOMEM;
  1369	
  1370		while (true) {
  1371			memset(feats_out, 0, feats_out_size);
  1372			ret = cxl_get_supported_features(mds, feats_out_size,
  1373							 feat_index, feats_out);
  1374			if (ret)
  1375				return ret;
  1376	
> 1377			nentries = feats_out->nr_entries;
  1378			if (!nentries)
  1379				return -EOPNOTSUPP;
  1380	
  1381			/* Check CXL memdev supports the feature */
  1382			feat_entry = feats_out->feat_entries;
  1383			for (count = 0; count < nentries; count++, feat_entry++) {
  1384				if (uuid_equal(&feat_entry->uuid, feat_uuid)) {
  1385					memcpy(feat_entry_out, feat_entry,
  1386					       sizeof(*feat_entry_out));
  1387					return 0;
  1388				}
  1389			}
  1390			feat_index += nentries;
  1391		}
  1392	}
  1393	EXPORT_SYMBOL_NS_GPL(cxl_get_supported_feature_entry, CXL);
  1394	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux