[linux-nvme:nvme-5.14 32/32] drivers/nvme/target/zns.c:257:6: warning: no previous prototype for function 'nvmet_bdev_zone_zmgmt_recv_work'
kernel test robot
lkp at intel.com
Tue Jun 15 14:39:43 PDT 2021
tree: git://git.infradead.org/nvme.git nvme-5.14
head: 9653e01d9c3c46930da3f007a39a2aaf230bd8ff
commit: 9653e01d9c3c46930da3f007a39a2aaf230bd8ff [32/32] nvmet: add ZBD over ZNS backend support
config: x86_64-randconfig-a014-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add linux-nvme git://git.infradead.org/nvme.git
git fetch --no-tags linux-nvme nvme-5.14
git checkout 9653e01d9c3c46930da3f007a39a2aaf230bd8ff
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/nvme/target/zns.c:257:6: warning: no previous prototype for function 'nvmet_bdev_zone_zmgmt_recv_work' [-Wmissing-prototypes]
void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
^
drivers/nvme/target/zns.c:257:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
^
static
1 warning generated.
vim +/nvmet_bdev_zone_zmgmt_recv_work +257 drivers/nvme/target/zns.c
256
> 257 void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
258 {
259 struct nvmet_req *req = container_of(w, struct nvmet_req, z.zmgmt_work);
260 sector_t start_sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba);
261 unsigned long req_slba_nr_zones = nvmet_req_nr_zones_from_slba(req);
262 u32 out_bufsize = (le32_to_cpu(req->cmd->zmr.numd) + 1) << 2;
263 __le64 nr_zones;
264 u16 status;
265 int ret;
266 struct nvmet_report_zone_data rz_data = {
267 .out_nr_zones = get_nr_zones_from_buf(req, out_bufsize),
268 /* leave the place for report zone header */
269 .out_buf_offset = sizeof(struct nvme_zone_report),
270 .zrasf = req->cmd->zmr.zrasf,
271 .nr_zones = 0,
272 .req = req,
273 };
274
275 status = nvmet_bdev_validate_zone_mgmt_recv(req);
276 if (status)
277 goto out;
278
279 if (!req_slba_nr_zones) {
280 status = NVME_SC_SUCCESS;
281 goto out;
282 }
283
284 ret = blkdev_report_zones(req->ns->bdev, start_sect, req_slba_nr_zones,
285 nvmet_bdev_report_zone_cb, &rz_data);
286 if (ret < 0) {
287 status = NVME_SC_INTERNAL;
288 goto out;
289 }
290
291 /*
292 * When partial bit is set nr_zones must indicate the number of zone
293 * descriptors actually transferred.
294 */
295 if (req->cmd->zmr.pr)
296 rz_data.nr_zones = min(rz_data.nr_zones, rz_data.out_nr_zones);
297
298 nr_zones = cpu_to_le64(rz_data.nr_zones);
299 status = nvmet_copy_to_sgl(req, 0, &nr_zones, sizeof(nr_zones));
300
301 out:
302 nvmet_req_complete(req, status);
303 }
304
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 36588 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20210616/1ef6d285/attachment-0001.gz>
More information about the Linux-nvme
mailing list