From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCHv12 11/12] nvme: register fdp parameters with the block layer
Date: Tue, 10 Dec 2024 04:08:17 +0800 [thread overview]
Message-ID: <202412100319.Y5vv98P8-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20241206221801.790690-12-kbusch@meta.com>
References: <20241206221801.790690-12-kbusch@meta.com>
TO: Keith Busch <kbusch@meta.com>
TO: axboe@kernel.dk
TO: hch@lst.de
TO: linux-block@vger.kernel.org
TO: linux-nvme@lists.infradead.org
TO: linux-fsdevel@vger.kernel.org
TO: io-uring@vger.kernel.org
CC: sagi@grimberg.me
CC: asml.silence@gmail.com
CC: anuj20.g@samsung.com
CC: joshi.k@samsung.com
CC: Keith Busch <kbusch@kernel.org>
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-20241209]
[cannot apply to brauner-vfs/vfs.all hch-configfs/for-next linus/master v6.13-rc2]
[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
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: csky-randconfig-r072-20241209 (https://download.01.org/0day-ci/archive/20241210/202412100319.Y5vv98P8-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202412100319.Y5vv98P8-lkp@intel.com/
New smatch warnings:
drivers/nvme/host/core.c:2187 nvme_check_fdp() error: uninitialized symbol 'i'.
drivers/nvme/host/core.c:2232 nvme_query_fdp_info() warn: missing error code 'ret'
Old smatch warnings:
drivers/nvme/host/core.c:4864 nvme_free_cels() warn: iterator 'i' not incremented
vim +/i +2187 drivers/nvme/host/core.c
eb867ee995bd68 Joel Granados 2022-07-12 2153
04ca0849938146 Keith Busch 2024-12-06 2154 static int nvme_check_fdp(struct nvme_ns *ns, struct nvme_ns_info *info,
04ca0849938146 Keith Busch 2024-12-06 2155 u8 fdp_idx)
04ca0849938146 Keith Busch 2024-12-06 2156 {
04ca0849938146 Keith Busch 2024-12-06 2157 struct nvme_fdp_config_log hdr, *h;
04ca0849938146 Keith Busch 2024-12-06 2158 struct nvme_fdp_config_desc *desc;
04ca0849938146 Keith Busch 2024-12-06 2159 size_t size = sizeof(hdr);
04ca0849938146 Keith Busch 2024-12-06 2160 int i, n, ret;
04ca0849938146 Keith Busch 2024-12-06 2161 void *log;
04ca0849938146 Keith Busch 2024-12-06 2162
04ca0849938146 Keith Busch 2024-12-06 2163 info->runs = 0;
04ca0849938146 Keith Busch 2024-12-06 2164 ret = nvme_get_log_lsi(ns->ctrl, 0, NVME_LOG_FDP_CONFIGS, 0, NVME_CSI_NVM,
04ca0849938146 Keith Busch 2024-12-06 2165 (void *)&hdr, size, 0, info->endgid);
04ca0849938146 Keith Busch 2024-12-06 2166 if (ret)
04ca0849938146 Keith Busch 2024-12-06 2167 return ret;
04ca0849938146 Keith Busch 2024-12-06 2168
04ca0849938146 Keith Busch 2024-12-06 2169 size = le32_to_cpu(hdr.sze);
04ca0849938146 Keith Busch 2024-12-06 2170 h = kzalloc(size, GFP_KERNEL);
04ca0849938146 Keith Busch 2024-12-06 2171 if (!h)
04ca0849938146 Keith Busch 2024-12-06 2172 return 0;
04ca0849938146 Keith Busch 2024-12-06 2173
04ca0849938146 Keith Busch 2024-12-06 2174 ret = nvme_get_log_lsi(ns->ctrl, 0, NVME_LOG_FDP_CONFIGS, 0, NVME_CSI_NVM,
04ca0849938146 Keith Busch 2024-12-06 2175 h, size, 0, info->endgid);
04ca0849938146 Keith Busch 2024-12-06 2176 if (ret)
04ca0849938146 Keith Busch 2024-12-06 2177 goto out;
04ca0849938146 Keith Busch 2024-12-06 2178
04ca0849938146 Keith Busch 2024-12-06 2179 n = le16_to_cpu(h->numfdpc) + 1;
04ca0849938146 Keith Busch 2024-12-06 2180 if (fdp_idx > n)
04ca0849938146 Keith Busch 2024-12-06 2181 goto out;
04ca0849938146 Keith Busch 2024-12-06 2182
04ca0849938146 Keith Busch 2024-12-06 2183 log = h + 1;
04ca0849938146 Keith Busch 2024-12-06 2184 do {
04ca0849938146 Keith Busch 2024-12-06 2185 desc = log;
04ca0849938146 Keith Busch 2024-12-06 2186 log += le16_to_cpu(desc->dsze);
04ca0849938146 Keith Busch 2024-12-06 @2187 } while (i++ < fdp_idx);
04ca0849938146 Keith Busch 2024-12-06 2188
04ca0849938146 Keith Busch 2024-12-06 2189 info->runs = le64_to_cpu(desc->runs);
04ca0849938146 Keith Busch 2024-12-06 2190 out:
04ca0849938146 Keith Busch 2024-12-06 2191 kfree(h);
04ca0849938146 Keith Busch 2024-12-06 2192 return ret;
04ca0849938146 Keith Busch 2024-12-06 2193 }
04ca0849938146 Keith Busch 2024-12-06 2194
04ca0849938146 Keith Busch 2024-12-06 2195 static int nvme_query_fdp_info(struct nvme_ns *ns, struct nvme_ns_info *info)
04ca0849938146 Keith Busch 2024-12-06 2196 {
04ca0849938146 Keith Busch 2024-12-06 2197 struct nvme_ns_head *head = ns->head;
04ca0849938146 Keith Busch 2024-12-06 2198 struct nvme_fdp_ruh_status *ruhs;
04ca0849938146 Keith Busch 2024-12-06 2199 struct nvme_fdp_config fdp;
04ca0849938146 Keith Busch 2024-12-06 2200 struct nvme_command c = {};
04ca0849938146 Keith Busch 2024-12-06 2201 int size, ret;
04ca0849938146 Keith Busch 2024-12-06 2202
04ca0849938146 Keith Busch 2024-12-06 2203 ret = nvme_get_features(ns->ctrl, NVME_FEAT_FDP, info->endgid, NULL, 0,
04ca0849938146 Keith Busch 2024-12-06 2204 &fdp);
04ca0849938146 Keith Busch 2024-12-06 2205 if (ret)
04ca0849938146 Keith Busch 2024-12-06 2206 goto err;
04ca0849938146 Keith Busch 2024-12-06 2207
04ca0849938146 Keith Busch 2024-12-06 2208 if (!(fdp.flags & FDPCFG_FDPE))
04ca0849938146 Keith Busch 2024-12-06 2209 goto err;
04ca0849938146 Keith Busch 2024-12-06 2210
04ca0849938146 Keith Busch 2024-12-06 2211 ret = nvme_check_fdp(ns, info, fdp.fdpcidx);
04ca0849938146 Keith Busch 2024-12-06 2212 if (ret || !info->runs)
04ca0849938146 Keith Busch 2024-12-06 2213 goto err;
04ca0849938146 Keith Busch 2024-12-06 2214
04ca0849938146 Keith Busch 2024-12-06 2215 size = struct_size(ruhs, ruhsd, NVME_MAX_PLIDS);
04ca0849938146 Keith Busch 2024-12-06 2216 ruhs = kzalloc(size, GFP_KERNEL);
04ca0849938146 Keith Busch 2024-12-06 2217 if (!ruhs) {
04ca0849938146 Keith Busch 2024-12-06 2218 ret = -ENOMEM;
04ca0849938146 Keith Busch 2024-12-06 2219 goto err;
04ca0849938146 Keith Busch 2024-12-06 2220 }
04ca0849938146 Keith Busch 2024-12-06 2221
04ca0849938146 Keith Busch 2024-12-06 2222 c.imr.opcode = nvme_cmd_io_mgmt_recv;
04ca0849938146 Keith Busch 2024-12-06 2223 c.imr.nsid = cpu_to_le32(head->ns_id);
04ca0849938146 Keith Busch 2024-12-06 2224 c.imr.mo = NVME_IO_MGMT_RECV_MO_RUHS;
04ca0849938146 Keith Busch 2024-12-06 2225 c.imr.numd = cpu_to_le32(nvme_bytes_to_numd(size));
04ca0849938146 Keith Busch 2024-12-06 2226 ret = nvme_submit_sync_cmd(ns->queue, &c, ruhs, size);
04ca0849938146 Keith Busch 2024-12-06 2227 if (ret)
04ca0849938146 Keith Busch 2024-12-06 2228 goto free;
04ca0849938146 Keith Busch 2024-12-06 2229
04ca0849938146 Keith Busch 2024-12-06 2230 head->nr_plids = le16_to_cpu(ruhs->nruhsd);
04ca0849938146 Keith Busch 2024-12-06 2231 if (!head->nr_plids)
04ca0849938146 Keith Busch 2024-12-06 @2232 goto free;
04ca0849938146 Keith Busch 2024-12-06 2233
04ca0849938146 Keith Busch 2024-12-06 2234 kfree(ruhs);
04ca0849938146 Keith Busch 2024-12-06 2235 return 0;
04ca0849938146 Keith Busch 2024-12-06 2236
04ca0849938146 Keith Busch 2024-12-06 2237 free:
04ca0849938146 Keith Busch 2024-12-06 2238 kfree(ruhs);
04ca0849938146 Keith Busch 2024-12-06 2239 err:
04ca0849938146 Keith Busch 2024-12-06 2240 head->nr_plids = 0;
04ca0849938146 Keith Busch 2024-12-06 2241 info->runs = 0;
04ca0849938146 Keith Busch 2024-12-06 2242 return ret;
04ca0849938146 Keith Busch 2024-12-06 2243 }
04ca0849938146 Keith Busch 2024-12-06 2244
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-12-09 20:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 20:08 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-06 22:17 [PATCHv12 00/12] block write streams with nvme fdp Keith Busch
2024-12-06 22:18 ` [PATCHv12 11/12] nvme: register fdp parameters with the block layer Keith Busch
2024-12-09 4:05 ` kernel test robot
2024-12-09 12:44 ` Christoph Hellwig
2024-12-09 8:34 ` Hannes Reinecke
2024-12-09 13:18 ` Christoph Hellwig
2024-12-09 16:29 ` Keith Busch
2024-12-10 8:45 ` Dan Carpenter
2024-12-10 15:23 ` Keith Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202412100319.Y5vv98P8-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.