Re: [PATCH v5 3/3] scsi: bsg: add io_uring passthrough handler
From: kernel test robot
Date: Wed Mar 04 2026 - 08:56:53 EST
Hi Yang,
kernel test robot noticed the following build errors:
[auto build test ERROR on axboe/for-next]
[also build test ERROR on jejb-scsi/for-next mkp-scsi/for-next linus/master v7.0-rc2 next-20260303]
[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/Yang-Xiuwei/bsg-add-bsg_uring_cmd-uapi-structure/20260304-160717
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git for-next
patch link: https://lore.kernel.org/r/20260304080313.675768-4-yangxiuwei%40kylinos.cn
patch subject: [PATCH v5 3/3] scsi: bsg: add io_uring passthrough handler
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260304/202603041450.tuj48h9Q-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260304/202603041450.tuj48h9Q-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603041450.tuj48h9Q-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/scsi/scsi_bsg.c: In function 'scsi_bsg_map_user_buffer':
>> drivers/scsi/scsi_bsg.c:111:71: error: macro "io_uring_sqe_cmd" requires 2 arguments, but only 1 given
111 | const struct bsg_uring_cmd *cmd = io_uring_sqe_cmd(ioucmd->sqe);
| ^
In file included from drivers/scsi/scsi_bsg.c:3:
include/linux/io_uring/cmd.h:29:9: note: macro "io_uring_sqe_cmd" defined here
29 | #define io_uring_sqe_cmd(sqe, type) ({ \
| ^~~~~~~~~~~~~~~~
>> drivers/scsi/scsi_bsg.c:111:43: error: 'io_uring_sqe_cmd' undeclared (first use in this function); did you mean 'io_uring_sqe'?
111 | const struct bsg_uring_cmd *cmd = io_uring_sqe_cmd(ioucmd->sqe);
| ^~~~~~~~~~~~~~~~
| io_uring_sqe
drivers/scsi/scsi_bsg.c:111:43: note: each undeclared identifier is reported only once for each function it appears in
drivers/scsi/scsi_bsg.c: In function 'scsi_bsg_uring_cmd':
drivers/scsi/scsi_bsg.c:137:71: error: macro "io_uring_sqe_cmd" requires 2 arguments, but only 1 given
137 | const struct bsg_uring_cmd *cmd = io_uring_sqe_cmd(ioucmd->sqe);
| ^
include/linux/io_uring/cmd.h:29:9: note: macro "io_uring_sqe_cmd" defined here
29 | #define io_uring_sqe_cmd(sqe, type) ({ \
| ^~~~~~~~~~~~~~~~
drivers/scsi/scsi_bsg.c:137:43: error: 'io_uring_sqe_cmd' undeclared (first use in this function); did you mean 'io_uring_sqe'?
137 | const struct bsg_uring_cmd *cmd = io_uring_sqe_cmd(ioucmd->sqe);
| ^~~~~~~~~~~~~~~~
| io_uring_sqe
drivers/scsi/scsi_bsg.c:203:21: error: assignment to 'enum rq_end_io_ret (*)(struct request *, blk_status_t, const struct io_comp_batch *)' {aka 'enum rq_end_io_ret (*)(struct request *, unsigned char, const struct io_comp_batch *)'} from incompatible pointer type 'enum rq_end_io_ret (*)(struct request *, blk_status_t)' {aka 'enum rq_end_io_ret (*)(struct request *, unsigned char)'} [-Wincompatible-pointer-types]
203 | req->end_io = scsi_bsg_uring_cmd_done;
| ^
vim +/io_uring_sqe_cmd +111 drivers/scsi/scsi_bsg.c
106
107 static int scsi_bsg_map_user_buffer(struct request *req,
108 struct io_uring_cmd *ioucmd,
109 unsigned int issue_flags, gfp_t gfp_mask)
110 {
> 111 const struct bsg_uring_cmd *cmd = io_uring_sqe_cmd(ioucmd->sqe);
112 struct iov_iter iter;
113 bool is_write = cmd->dout_xfer_len > 0;
114 u64 buf_addr = is_write ? cmd->dout_xferp : cmd->din_xferp;
115 unsigned long buf_len = is_write ? cmd->dout_xfer_len : cmd->din_xfer_len;
116 int ret;
117
118 if (ioucmd->flags & IORING_URING_CMD_FIXED) {
119 ret = io_uring_cmd_import_fixed(buf_addr, buf_len,
120 is_write ? WRITE : READ,
121 &iter, ioucmd, issue_flags);
122 if (ret < 0)
123 return ret;
124 ret = blk_rq_map_user_iov(req->q, req, NULL, &iter, gfp_mask);
125 } else {
126 ret = blk_rq_map_user(req->q, req, NULL, uptr64(buf_addr),
127 buf_len, gfp_mask);
128 }
129
130 return ret;
131 }
132
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki