Re: [PATCH v5 11/18] nvme: Add pr_ops read_keys support

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


Hi Mike,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next axboe-block/for-next linus/master v6.3-rc4 next-20230328]
[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]

base: for-next
patch link:
patch subject: [PATCH v5 11/18] nvme: Add pr_ops read_keys support
config: i386-randconfig-s002 (
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        git remote add linux-review
        git fetch --no-tags linux-review Mike-Christie/block-Add-PR-callouts-for-read-keys-and-reservation/20230325-022314
        git checkout fcd2233cf643c550ab3cea2b6102077b1d05b389
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/nvme/host/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link:

sparse warnings: (new ones prefixed by >>)
>> drivers/nvme/host/pr.c:165:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [assigned] [usertype] cdw11 @@     got int @@
   drivers/nvme/host/pr.c:165:24: sparse:     expected restricted __le32 [assigned] [usertype] cdw11
   drivers/nvme/host/pr.c:165:24: sparse:     got int
>> drivers/nvme/host/pr.c:171:21: sparse: sparse: restricted __le32 degrades to integer

vim +165 drivers/nvme/host/pr.c

   157	static int nvme_pr_resv_report(struct block_device *bdev, void *data,
   158			u32 data_len, bool *eds)
   159	{
   160		struct nvme_command c = { };
   161		int ret;
   163		c.common.opcode = nvme_cmd_resv_report;
   164		c.common.cdw10 = cpu_to_le32(nvme_bytes_to_numd(data_len));
 > 165		c.common.cdw11 = NVME_EXTENDED_DATA_STRUCT;
   166		*eds = true;
   168	retry:
   169		ret = nvme_send_pr_command(bdev, &c, data, data_len);
   170		if (ret == NVME_SC_HOST_ID_INCONSIST &&
 > 171		    c.common.cdw11 == NVME_EXTENDED_DATA_STRUCT) {
   172			c.common.cdw11 = 0;
   173			*eds = false;
   174			goto retry;
   175		}
   177		if (ret < 0)
   178			return ret;
   180		return nvme_sc_to_pr_err(ret);
   181	}

0-DAY CI Kernel Test Service

[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux