[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203120559.66PKUxNh-lkp@intel.com>
Date: Sat, 12 Mar 2022 05:24:57 +0800
From: kernel test robot <lkp@...el.com>
To: Kanchan Joshi <joshi.k@...sung.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>,
Anuj Gupta <anuj20.g@...sung.com>
Subject: [mcgrof-next:20220311-io-uring-cmd 16/17] fs/io_uring.c:4215:31:
warning: cast to pointer from integer of different size
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20220311-io-uring-cmd
head: abe791464a630c1cc3821258e002a0a623dc9b5a
commit: d7b1a5fd9fdbe454f93795f46e040951a4510d2e [16/17] io_uring: add support for non-inline uring-cmd
config: arm-buildonly-randconfig-r006-20220310 (https://download.01.org/0day-ci/archive/20220312/202203120559.66PKUxNh-lkp@intel.com/config)
compiler: arm-linux-gnueabi-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/mcgrof/linux-next.git/commit/?id=d7b1a5fd9fdbe454f93795f46e040951a4510d2e
git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
git fetch --no-tags mcgrof-next 20220311-io-uring-cmd
git checkout d7b1a5fd9fdbe454f93795f46e040951a4510d2e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
fs/io_uring.c: In function '__io_submit_flush_completions':
fs/io_uring.c:2562:40: warning: variable 'prev' set but not used [-Wunused-but-set-variable]
2562 | struct io_wq_work_node *node, *prev;
| ^~~~
fs/io_uring.c: In function 'io_uring_cmd_prep':
>> fs/io_uring.c:4215:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
4215 | ioucmd->cmd = (void *) sqe->cmd;
| ^
vim +4215 fs/io_uring.c
4186
4187 static int io_uring_cmd_prep(struct io_kiocb *req,
4188 const struct io_uring_sqe *sqe)
4189 {
4190 struct io_ring_ctx *ctx = req->ctx;
4191 struct io_uring_cmd *ioucmd = &req->uring_cmd;
4192 u32 ucmd_flags = READ_ONCE(sqe->uring_cmd_flags);
4193
4194 if (!req->file->f_op->async_cmd)
4195 return -EOPNOTSUPP;
4196 if (!(req->ctx->flags & IORING_SETUP_SQE128) &&
4197 !(ucmd_flags & IORING_URING_CMD_INDIRECT))
4198 return -EOPNOTSUPP;
4199 if (req->ctx->flags & IORING_SETUP_IOPOLL) {
4200 ioucmd->flags = IO_URING_F_UCMD_POLLED;
4201 ioucmd->bio = NULL;
4202 req->iopoll_completed = 0;
4203 } else {
4204 ioucmd->flags = 0;
4205 }
4206 if (req->opcode == IORING_OP_URING_CMD_FIXED) {
4207 req->imu = NULL;
4208 io_req_set_rsrc_node(req, ctx);
4209 req->buf_index = READ_ONCE(sqe->buf_index);
4210 ioucmd->flags |= IO_URING_F_UCMD_FIXEDBUFS;
4211 }
4212
4213 if (ucmd_flags & IORING_URING_CMD_INDIRECT) {
4214 ioucmd->flags |= IO_URING_F_UCMD_INDIRECT;
> 4215 ioucmd->cmd = (void *) sqe->cmd;
4216 } else {
4217 ioucmd->cmd = (void *) &sqe->cmd;
4218 }
4219 ioucmd->cmd_op = READ_ONCE(sqe->cmd_op);
4220 ioucmd->cmd_len = READ_ONCE(sqe->cmd_len);
4221 return 0;
4222 }
4223
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists