mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/uio/uio.c:520:21: sparse: sparse: incorrect type in assignment (different base types)
@ 2024-02-11  2:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-02-11  2:03 UTC (permalink / raw)
  To: Hamish Martin; +Cc: oe-kbuild-all, linux-kernel, Chris Packham

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a5b6244cf87c50358f5562b8f07f7ac35fc7f6b0
commit: a93e7b331568227500186a465fee3c2cb5dffd1f uio: Prevent device destruction while fds are open
date:   6 years ago
config: x86_64-randconfig-x051-20230705 (https://download.01.org/0day-ci/archive/20240211/202402111048.4XHz0rkp-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240211/202402111048.4XHz0rkp-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/202402111048.4XHz0rkp-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/uio/uio.c:520:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __poll_t [usertype] ret @@     got int @@
   drivers/uio/uio.c:520:21: sparse:     expected restricted __poll_t [usertype] ret
   drivers/uio/uio.c:520:21: sparse:     got int
   drivers/uio/uio.c:852: warning: expecting prototype for uio_register_device(). Prototype was for __uio_register_device() instead

vim +520 drivers/uio/uio.c

   510	
   511	static __poll_t uio_poll(struct file *filep, poll_table *wait)
   512	{
   513		struct uio_listener *listener = filep->private_data;
   514		struct uio_device *idev = listener->dev;
   515		__poll_t ret = 0;
   516		unsigned long flags;
   517	
   518		spin_lock_irqsave(&idev->info_lock, flags);
   519		if (!idev->info || !idev->info->irq)
 > 520			ret = -EIO;
   521		spin_unlock_irqrestore(&idev->info_lock, flags);
   522	
   523		if (ret)
   524			return ret;
   525	
   526		poll_wait(filep, &idev->wait, wait);
   527		if (listener->event_count != atomic_read(&idev->event))
   528			return EPOLLIN | EPOLLRDNORM;
   529		return 0;
   530	}
   531	

-- 
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:[~2024-02-11  2:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11  2:03 drivers/uio/uio.c:520:21: sparse: sparse: incorrect type in assignment (different base types) 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

all inboxes | Powered by JetHome®