Re: [PATCHv12 11/12] nvme: register fdp parameters with the block layer

kernel test robot
2024-12-09T04:06:08Z

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-20241206]
[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-write-stream-information-to-statx/20241207-063826
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link: https://lore.kernel.org/r/20241206221801.790690-12-kbusch%40meta.com
patch subject: [PATCHv12 11/12] nvme: register fdp parameters with the block layer
config: i386-buildonly-randconfig-001-20241207 (https://download.01.org/0day-ci/archive/20241207/202412071144.9uXFLnls-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/20241207/202412071144.9uXFLnls-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412071144.9uXFLnls-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:2187:11: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
2187 | } while (i++ < fdp_idx);
| ^
drivers/nvme/host/core.c:2160:7: note: initialize the variable 'i' to silence this warning
2160 | int i, n, ret;
| ^
| = 0
2 warnings generated.

vim +/i +2187 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 struct nvme_fdp_config_desc *desc;
2159 size_t size = sizeof(hdr);
2160 int i, n, ret;
2161 void *log;
2162
2163 info->runs = 0;
2164 ret = nvme_get_log_lsi(ns->ctrl, 0, NVME_LOG_FDP_CONFIGS, 0, NVME_CSI_NVM,
2165 (void *)&hdr, size, 0, info->endgid);
2166 if (ret)
2167 return ret;
2168
2169 size = le32_to_cpu(hdr.sze);
2170 h = kzalloc(size, GFP_KERNEL);
2171 if (!h)
2172 return 0;
2173
2174 ret = nvme_get_log_lsi(ns->ctrl, 0, NVME_LOG_FDP_CONFIGS, 0, NVME_CSI_NVM,
2175 h, size, 0, info->endgid);
2176 if (ret)
2177 goto out;
2178
2179 n = le16_to_cpu(h->numfdpc) + 1;
2180 if (fdp_idx > n)
2181 goto out;
2182
2183 log = h + 1;
2184 do {
2185 desc = log;
2186 log += le16_to_cpu(desc->dsze);
> 2187 } while (i++ < fdp_idx);
2188
2189 info->runs = le64_to_cpu(desc->runs);
2190 out:
2191 kfree(h);
2192 return ret;
2193 }
2194

--
0-DAY CI Kernel Test Service