All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [axboe:io_uring-io-slots 6/18] io_uring/slot.c:189:24: sparse: sparse: incorrect type in assignment (different base types)
Date: Mon, 22 Jun 2026 21:05:30 +0800	[thread overview]
Message-ID: <202606222147.xHJldm7B-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git io_uring-io-slots
head:   1df7c6218b89284dc5234517cc2d0eae158726a2
commit: 692d2c0e4347c8712317a40dbf60e95019c1737d [6/18] io_uring: add IORING_OP_SLOT_RW and wire up slot completion
config: alpha-randconfig-r111-20260618 (https://download.01.org/0day-ci/archive/20260622/202606222147.xHJldm7B-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 10.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260622/202606222147.xHJldm7B-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606222147.xHJldm7B-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> io_uring/slot.c:189:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned char [usertype] op @@     got restricted blk_opf_t @@
   io_uring/slot.c:189:24: sparse:     expected unsigned char [usertype] op
   io_uring/slot.c:189:24: sparse:     got restricted blk_opf_t
   io_uring/slot.c:191:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned char [usertype] op @@     got restricted blk_opf_t @@
   io_uring/slot.c:191:24: sparse:     expected unsigned char [usertype] op
   io_uring/slot.c:191:24: sparse:     got restricted blk_opf_t

vim +189 io_uring/slot.c

   156	
   157	int io_slot_rw_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
   158	{
   159		struct io_slot_rw *rw = io_kiocb_to_cmd(req, struct io_slot_rw);
   160		u32 rw_flags;
   161	
   162		/*
   163		 * Using slot read/write with IOSQE_ASYNC is inefficient and hence a
   164		 * terrible idea, better make that explicit.
   165		 */
   166		if (req->flags & REQ_F_FORCE_ASYNC)
   167			return -EINVAL;
   168	
   169		if (sqe->file_index || sqe->addr3)
   170			return -EINVAL;
   171	
   172		rw_flags = READ_ONCE(sqe->rw_flags);
   173		if (rw_flags & ~IORING_SLOT_RW_WRITE)
   174			return -EINVAL;
   175	
   176		rw->offset = READ_ONCE(sqe->off);
   177		if (rw->offset & ((1ULL << SECTOR_SHIFT) - 1))
   178			return -EINVAL;
   179		rw->buf_off = READ_ONCE(sqe->addr);
   180		if (rw->buf_off & ((1ULL << SECTOR_SHIFT) - 1))
   181			return -EINVAL;
   182	
   183		rw->slot_id = READ_ONCE(sqe->buf_index);
   184		rw->nbytes = READ_ONCE(sqe->len);
   185		if (!rw->nbytes)
   186			return -EINVAL;
   187	
   188		if (rw_flags & IORING_SLOT_RW_WRITE)
 > 189			rw->op = REQ_OP_WRITE;
   190		else
   191			rw->op = REQ_OP_READ;
   192		return 0;
   193	}
   194	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-06-22 13:06 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=202606222147.xHJldm7B-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=axboe@kernel.dk \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.