[PATCH] nvme: enable FDP support
kernel test robot
lkp at intel.com
Sat May 11 02:20:00 PDT 2024
Hi Kanchan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on linus/master v6.9-rc7 next-20240510]
[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/Kanchan-Joshi/nvme-enable-FDP-support/20240510-214900
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link: https://lore.kernel.org/r/20240510134015.29717-1-joshi.k%40samsung.com
patch subject: [PATCH] nvme: enable FDP support
config: x86_64-randconfig-121-20240511 (https://download.01.org/0day-ci/archive/20240511/202405111758.Ts2xnoZH-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240511/202405111758.Ts2xnoZH-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/202405111758.Ts2xnoZH-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/nvme/host/core.c:2120:30: sparse: sparse: cast to restricted __le16
drivers/nvme/host/core.c:2126:38: sparse: sparse: cast to restricted __le16
drivers/nvme/host/core.c: note: in included file (through include/linux/wait.h, include/linux/wait_bit.h, include/linux/fs.h, ...):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
vim +2120 drivers/nvme/host/core.c
2098
2099 static int nvme_fetch_fdp_plids(struct nvme_ns *ns, u32 nsid)
2100 {
2101 struct nvme_command c = {};
2102 struct nvme_fdp_ruh_status *ruhs;
2103 struct nvme_fdp_ruh_status_desc *ruhsd;
2104 int size, ret, i;
2105
2106 size = sizeof(*ruhs) + NVME_MAX_PLIDS * sizeof(*ruhsd);
2107 ruhs = kzalloc(size, GFP_KERNEL);
2108 if (!ruhs)
2109 return -ENOMEM;
2110
2111 c.imr.opcode = nvme_cmd_io_mgmt_recv;
2112 c.imr.nsid = cpu_to_le32(nsid);
2113 c.imr.mo = 0x1;
2114 c.imr.numd = cpu_to_le32((size >> 2) - 1);
2115
2116 ret = nvme_submit_sync_cmd(ns->queue, &c, ruhs, size);
2117 if (ret)
2118 goto out;
2119
> 2120 ns->head->nr_plids = le16_to_cpu(ruhs->nruhsd);
2121 ns->head->nr_plids =
2122 min_t(u16, ns->head->nr_plids, NVME_MAX_PLIDS);
2123
2124 for (i = 0; i < ns->head->nr_plids; i++) {
2125 ruhsd = &ruhs->ruhsd[i];
2126 ns->head->plids[i] = le16_to_cpu(ruhsd->pid);
2127 }
2128 out:
2129 kfree(ruhs);
2130 return ret;
2131 }
2132
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-nvme
mailing list