drivers/dma/idxd/cdev.c:503:24: sparse: sparse: incorrect type in return expression (different base types)
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 08710e696081d58163c8078e0e096be6d35c5fad commit: 8dfa57aabff625bf445548257f7711ef294cd30e [5014/9308] dmaengine: idxd: Fix allowing write() from different address spaces config: x86_64-randconfig-122-20250503 (https://download.01.org/0day-ci/archive/20250508/[email protected]/config) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250508/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
sparse warnings: (new ones prefixed by >>)
>> drivers/dma/idxd/cdev.c:503:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __poll_t @@ got int @@
drivers/dma/idxd/cdev.c:503:24: sparse: expected restricted __poll_t
drivers/dma/idxd/cdev.c:503:24: sparse: got int
vim +503 drivers/dma/idxd/cdev.c
493
494 static __poll_t idxd_cdev_poll(struct file *filp,
495 struct poll_table_struct *wait)
496 {
497 struct idxd_user_context *ctx = filp->private_data;
498 struct idxd_wq *wq = ctx->wq;
499 struct idxd_device *idxd = wq->idxd;
500 __poll_t out = 0;
501
502 if (current->mm != ctx->mm)
> 503 return -EPERM;
504
505 poll_wait(filp, &wq->err_queue, wait);
506 spin_lock(&idxd->dev_lock);
507 if (idxd->sw_err.valid)
508 out = EPOLLIN | EPOLLRDNORM;
509 spin_unlock(&idxd->dev_lock);
510
511 return out;
512 }
513
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki