[PATCH v5 11/18] nvme: Add pr_ops read_keys support
Mike Christie
michael.christie at oracle.com
Tue Mar 28 08:50:24 PDT 2023
On 3/28/23 2:11 AM, kernel test robot wrote:
> 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
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Mike-Christie/block-Add-PR-callouts-for-read-keys-and-reservation/20230325-022314
> base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
> patch link: https://lore.kernel.org/r/20230324181741.13908-12-michael.christie%40oracle.com
> patch subject: [PATCH v5 11/18] nvme: Add pr_ops read_keys support
> config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20230328/202303281502.U47uzous-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.4-39-gce1a6720-dirty
> # https://github.com/intel-lab-lkp/linux/commit/fcd2233cf643c550ab3cea2b6102077b1d05b389
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> 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 at intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303281502.U47uzous-lkp@intel.com/
>
> 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
>
> 156
> 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;
> 162
> 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;
> 167
> 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) {
Kernel test bot is correct. Will fix.
More information about the Linux-nvme
mailing list