[axboe-block:nvme-passthru-wip 16/19] drivers/nvme/host/ioctl.c:82:32: warning: variable 'ucd' set but not used

From: kernel test robot
Date: Thu Oct 07 2021 - 18:28:27 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git nvme-passthru-wip
head: 9c18980ac90053bcdb21594eae48935d89bf389c
commit: 40669a7355a5518181c2f7c4113d9f8fb808c658 [16/19] nvme: don't store intermediate result/status in command
config: sparc-buildonly-randconfig-r006-20211007 (attached as .config)
compiler: sparc-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=40669a7355a5518181c2f7c4113d9f8fb808c658
git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block nvme-passthru-wip
git checkout 40669a7355a5518181c2f7c4113d9f8fb808c658
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sparc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from drivers/nvme/host/nvme.h:19,
from drivers/nvme/host/ioctl.c:8:
include/linux/io_uring.h:55:5: warning: no previous prototype for 'io_uring_cmd_import_fixed' [-Wmissing-prototypes]
55 | int io_uring_cmd_import_fixed(void *ubuf, unsigned long len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c: In function 'nvme_pt_task_cb':
drivers/nvme/host/ioctl.c:45:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
45 | ptcmd64 = (void __user *) bcmd->unused2[0];
| ^
drivers/nvme/host/ioctl.c:71:58: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
71 | struct nvme_passthru_cmd __user *ptcmd = (void *)bcmd->unused2[0];
| ^
drivers/nvme/host/ioctl.c: In function 'nvme_end_async_pt':
>> drivers/nvme/host/ioctl.c:82:32: warning: variable 'ucd' set but not used [-Wunused-but-set-variable]
82 | struct uring_cmd_data *ucd;
| ^~~
drivers/nvme/host/ioctl.c: At top level:
drivers/nvme/host/ioctl.c:155:5: warning: no previous prototype for 'nvme_rq_map_user_fixedb' [-Wmissing-prototypes]
155 | int nvme_rq_map_user_fixedb(struct request_queue *q, struct request *rq,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/nvme/host/ioctl.c: In function 'nvme_submit_user_cmd':
drivers/nvme/host/ioctl.c:244:17: error: implicit declaration of function '__blk_execute_rq_nowait'; did you mean 'blk_execute_rq_nowait'? [-Werror=implicit-function-declaration]
244 | __blk_execute_rq_nowait(ns ? ns->disk : NULL, req, false, false,
| ^~~~~~~~~~~~~~~~~~~~~~~
| blk_execute_rq_nowait
drivers/nvme/host/ioctl.c: In function 'nvme_ns_async_ioctl':
drivers/nvme/host/ioctl.c:531:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
531 | void __user *argp = (void __user *) bcmd->unused2[0];
| ^
cc1: some warnings being treated as errors


vim +/ucd +82 drivers/nvme/host/ioctl.c

5cc445dd8df6e06 Kanchan Joshi 2021-08-05 78
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 79 static void nvme_end_async_pt(struct request *req, blk_status_t err)
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 80 {
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 81 struct io_uring_cmd *ioucmd;
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 @82 struct uring_cmd_data *ucd;
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 83
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 84 ioucmd = req->end_io_data;
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 85 ucd = (struct uring_cmd_data *) nvme_ioucmd_data_addr(ioucmd);
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 86
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 87 /* this takes care of setting up task-work */
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 88 io_uring_cmd_complete_in_task(ioucmd, nvme_pt_task_cb);
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 89 }
5cc445dd8df6e06 Kanchan Joshi 2021-08-05 90

:::::: The code at line 82 was first introduced by commit
:::::: 5cc445dd8df6e06f3482711aa590170450364393 nvme: wire-up support for async-passthru on char-device.

:::::: TO: Kanchan Joshi <joshi.k@xxxxxxxxxxx>
:::::: CC: Jens Axboe <axboe@xxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip