mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Luis Chamberlain <mcgrof@kernel.org>,
	Anuj Gupta <anuj20.g@samsung.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
Date: Sat, 12 Mar 2022 05:24:57 +0800	[thread overview]
Message-ID: <202203120559.66PKUxNh-lkp@intel.com> (raw)

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@intel.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

                 reply	other threads:[~2022-03-11 23:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202203120559.66PKUxNh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anuj20.g@samsung.com \
    --cc=joshi.k@samsung.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®