Subject: [xlnx:xlnx_rebase_v4.19 1546/1668] drivers/uio/uio_core.c:564:21: sparse: sparse: incorrect type in assignment (different base types)

From: kbuild test robot <[email-masked]>
Date: Tue, 1 Oct 2019 12:58:28 +0800

Hi Alexandru,

First bad commit (maybe != root cause):

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v4.19
head:   63166c634f2972b2e6949be0d5c998364af85fa8
commit: 46e491438385416be6dab43faa451e3755848cac [1546/1668] uio: rename uio.c -> uio_core.c & unify into uio.ko
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
        git checkout 46e491438385416be6dab43faa451e3755848cac
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email-masked]>

sparse warnings: (new ones prefixed by >>)

>> drivers/uio/uio_core.c:564:21: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __poll_t [usertype] ret @@    got e] ret @@
>> drivers/uio/uio_core.c:564:21: sparse:    expected restricted __poll_t [usertype] ret
>> drivers/uio/uio_core.c:564:21: sparse:    got int

vim +564 drivers/uio/uio_core.c

beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  555  
afc9a42b7464f7 drivers/uio/uio.c Al Viro        2017-07-03  556  static __poll_t uio_poll(struct file *filep, poll_table *wait)
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  557  {
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  558  	struct uio_listener *listener = filep->private_data;
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  559  	struct uio_device *idev = listener->dev;
a93e7b33156822 drivers/uio/uio.c Hamish Martin  2018-05-14  560  	__poll_t ret = 0;
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  561  
543af5861f41af drivers/uio/uio.c Xiubo Li       2018-07-06  562  	mutex_lock(&idev->info_lock);
a93e7b33156822 drivers/uio/uio.c Hamish Martin  2018-05-14  563  	if (!idev->info || !idev->info->irq)
a93e7b33156822 drivers/uio/uio.c Hamish Martin  2018-05-14 @564  		ret = -EIO;
543af5861f41af drivers/uio/uio.c Xiubo Li       2018-07-06  565  	mutex_unlock(&idev->info_lock);
a93e7b33156822 drivers/uio/uio.c Hamish Martin  2018-05-14  566  
a93e7b33156822 drivers/uio/uio.c Hamish Martin  2018-05-14  567  	if (ret)
a93e7b33156822 drivers/uio/uio.c Hamish Martin  2018-05-14  568  		return ret;
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  569  
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  570  	poll_wait(filep, &idev->wait, wait);
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  571  	if (listener->event_count != atomic_read(&idev->event))
a9a08845e9acbd drivers/uio/uio.c Linus Torvalds 2018-02-11  572  		return EPOLLIN | EPOLLRDNORM;
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  573  	return 0;
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  574  }
beafc54c4e2fba drivers/uio/uio.c Hans J. Koch   2006-12-07  575  

:::::: The code at line 564 was first introduced by commit
:::::: a93e7b331568227500186a465fee3c2cb5dffd1f uio: Prevent device destruction while fds are open

:::::: TO: Hamish Martin <[email-masked]>
:::::: CC: Greg Kroah-Hartman <[email-masked]>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel