The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* drivers/dma/idxd/cdev.c:503:24: sparse: sparse: incorrect type in return expression (different base types)
@ 2025-12-15  9:17 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-12-15  9:17 UTC (permalink / raw)
  To: Vinicius Costa Gomes; +Cc: oe-kbuild-all, linux-kernel, Vinod Koul, Dave Jiang

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8f0b4cce4481fb22653697cced8d0d04027cb1e8
commit: 8dfa57aabff625bf445548257f7711ef294cd30e dmaengine: idxd: Fix allowing write() from different address spaces
date:   8 months ago
config: x86_64-randconfig-r122-20251215 (https://download.01.org/0day-ci/archive/20251215/202512151753.eExr3PMz-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512151753.eExr3PMz-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/202512151753.eExr3PMz-lkp@intel.com/

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	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/dma/idxd/cdev.c:503:24: sparse: sparse: incorrect type in return expression (different base types)
@ 2025-12-15 14:08 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-12-15 14:08 UTC (permalink / raw)
  To: Vinicius Costa Gomes; +Cc: oe-kbuild-all, linux-kernel, Vinod Koul, Dave Jiang

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8f0b4cce4481fb22653697cced8d0d04027cb1e8
commit: 8dfa57aabff625bf445548257f7711ef294cd30e dmaengine: idxd: Fix allowing write() from different address spaces
date:   8 months ago
config: x86_64-randconfig-r122-20251215 (https://download.01.org/0day-ci/archive/20251215/202512152206.bFVf1Xm9-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512152206.bFVf1Xm9-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/202512152206.bFVf1Xm9-lkp@intel.com/

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	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-15 14:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-15  9:17 drivers/dma/idxd/cdev.c:503:24: sparse: sparse: incorrect type in return expression (different base types) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-12-15 14:08 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox