All of lore.kernel.org
 help / color / mirror / Atom feed
* [axboe:io_uring-io-slots 6/18] io_uring/slot.c:189:24: sparse: sparse: incorrect type in assignment (different base types)
@ 2026-06-22 13:05 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-22 13:05 UTC (permalink / raw)
  To: Jens Axboe; +Cc: oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-22 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 13:05 [axboe:io_uring-io-slots 6/18] io_uring/slot.c:189:24: sparse: sparse: incorrect type in assignment (different base types) kernel test robot

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.