[PATCHv11 09/10] nvme: register fdp queue limits
kernel test robot
lkp at intel.com
Thu Dec 5 21:26:59 PST 2024
Hi Keith,
kernel test robot noticed the following build warnings:
[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on next-20241205]
[cannot apply to brauner-vfs/vfs.all hch-configfs/for-next linus/master v6.13-rc1]
[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/Keith-Busch/fs-add-a-write-stream-field-to-the-kiocb/20241206-095707
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link: https://lore.kernel.org/r/20241206015308.3342386-10-kbusch%40meta.com
patch subject: [PATCHv11 09/10] nvme: register fdp queue limits
config: i386-buildonly-randconfig-003 (https://download.01.org/0day-ci/archive/20241206/202412061328.YMG9MZn5-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241206/202412061328.YMG9MZn5-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/202412061328.YMG9MZn5-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/nvme/host/core.c:8:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/x86/include/asm/cacheflush.h:5:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/nvme/host/core.c:2178:18: warning: variable 'h' is uninitialized when used here [-Wuninitialized]
2178 | n = le16_to_cpu(h->numfdpc) + 1;
| ^
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
91 | #define le16_to_cpu __le16_to_cpu
| ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
drivers/nvme/host/core.c:2157:36: note: initialize the variable 'h' to silence this warning
2157 | struct nvme_fdp_config_log hdr, *h;
| ^
| = NULL
2 warnings generated.
vim +/h +2178 drivers/nvme/host/core.c
2153
2154 static int nvme_check_fdp(struct nvme_ns *ns, struct nvme_ns_info *info,
2155 u8 fdp_idx)
2156 {
2157 struct nvme_fdp_config_log hdr, *h;
2158 size_t size = sizeof(hdr);
2159 int i, n, ret;
2160 void *log;
2161
2162 info->runs = 0;
2163 ret = nvme_get_log_lsi(ns->ctrl, 0, NVME_LOG_FDP_CONFIG, 0, NVME_CSI_NVM,
2164 (void *)&hdr, size, 0, info->endgid);
2165 if (ret)
2166 return ret;
2167
2168 size = le32_to_cpu(hdr.sze);
2169 log = kzalloc(size, GFP_KERNEL);
2170 if (!log)
2171 return 0;
2172
2173 ret = nvme_get_log_lsi(ns->ctrl, 0, NVME_LOG_FDP_CONFIG, 0, NVME_CSI_NVM,
2174 log, size, 0, info->endgid);
2175 if (ret)
2176 goto out;
2177
> 2178 n = le16_to_cpu(h->numfdpc) + 1;
2179 if (fdp_idx > n)
2180 goto out;
2181
2182 h = log;
2183 log = h->configs;
2184 for (i = 0; i < n; i++) {
2185 struct nvme_fdp_config_desc *config = log;
2186
2187 if (i == fdp_idx) {
2188 info->runs = le64_to_cpu(config->runs);
2189 break;
2190 }
2191 log += le16_to_cpu(config->size);
2192 }
2193 out:
2194 kfree(h);
2195 return ret;
2196 }
2197
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-nvme
mailing list