[PATCH 3/3 v2] nvmet: add rotational support

kernel test robot lkp at intel.com
Fri Oct 11 10:11:43 PDT 2024


Hi Matias,

kernel test robot noticed the following build warnings:

[auto build test WARNING on v6.12-rc2]
[also build test WARNING on linus/master next-20241011]
[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/Matias-Bj-rling/nvme-make-independent-ns-identify-default/20241010-204205
base:   v6.12-rc2
patch link:    https://lore.kernel.org/r/20241010123951.1226105-4-m%40bjorling.me
patch subject: [PATCH 3/3 v2] nvmet: add rotational support
config: i386-randconfig-062-20241011 (https://download.01.org/0day-ci/archive/20241012/202410120113.A3HaEkbg-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241012/202410120113.A3HaEkbg-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410120113.A3HaEkbg-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/nvme/target/admin-cmd.c:704:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] anagrpid @@     got unsigned int [usertype] anagrpid @@
   drivers/nvme/target/admin-cmd.c:704:22: sparse:     expected restricted __le32 [usertype] anagrpid
   drivers/nvme/target/admin-cmd.c:704:22: sparse:     got unsigned int [usertype] anagrpid

vim +704 drivers/nvme/target/admin-cmd.c

   687	
   688	static void nvmet_execute_id_cs_indep(struct nvmet_req *req)
   689	{
   690		struct nvme_id_ns_cs_indep *id;
   691		u16 status;
   692	
   693		status = nvmet_req_find_ns(req);
   694		if (status)
   695			goto out;
   696	
   697		id = kzalloc(sizeof(*id), GFP_KERNEL);
   698		if (!id) {
   699			status = NVME_SC_INTERNAL;
   700			goto out;
   701		}
   702	
   703		id->nstat = NVME_NSTAT_NRDY;
 > 704		id->anagrpid = req->ns->anagrpid;
   705		id->nmic = NVME_NS_NMIC_SHARED;
   706		if (req->ns->readonly)
   707			id->nsattr |= NVME_NS_ATTR_RO;
   708		if (req->ns->bdev && !bdev_nonrot(req->ns->bdev))
   709			id->nsfeat |= NVME_NS_ROTATIONAL;
   710	
   711		status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id));
   712		kfree(id);
   713	out:
   714		nvmet_req_complete(req, status);
   715	}
   716	

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



More information about the Linux-nvme mailing list