All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/ptp/ptp_vmclock.c:445:24: sparse: sparse: incorrect type in return expression (different base types)
@ 2026-06-22 13:53 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-06-22 13:53 UTC (permalink / raw)
  To: Babis Chalios
  Cc: oe-kbuild-all, linux-kernel, Jakub Kicinski, David Woodhouse,
	Takahiro Itazuri

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ef0c9f75a19532d7675384708fc8621e10850104
commit: 3b1526ddb25452385b52f2588b655f524a57070b ptp: vmclock: support device notifications
date:   5 months ago
config: x86_64-randconfig-123-20260622 (https://download.01.org/0day-ci/archive/20260622/202606222129.M1YS26K2-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260622/202606222129.M1YS26K2-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
| Fixes: 3b1526ddb254 ("ptp: vmclock: support device notifications")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606222129.M1YS26K2-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/ptp/ptp_vmclock.c:445:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __poll_t @@     got int @@
   drivers/ptp/ptp_vmclock.c:445:24: sparse:     expected restricted __poll_t
   drivers/ptp/ptp_vmclock.c:445:24: sparse:     got int
   drivers/ptp/ptp_vmclock.c:451:31: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __poll_t @@     got int @@
   drivers/ptp/ptp_vmclock.c:451:31: sparse:     expected restricted __poll_t
   drivers/ptp/ptp_vmclock.c:451:31: sparse:     got int

vim +445 drivers/ptp/ptp_vmclock.c

   433	
   434	static __poll_t vmclock_miscdev_poll(struct file *fp, poll_table *wait)
   435	{
   436		struct vmclock_file_state *fst = fp->private_data;
   437		struct vmclock_state *st = fst->st;
   438		uint32_t seq;
   439	
   440		/*
   441		 * Hypervisor will not send us any notifications, so fail immediately
   442		 * to avoid having caller sleeping for ever.
   443		 */
   444		if (!(le64_to_cpu(st->clk->flags) & VMCLOCK_FLAG_NOTIFICATION_PRESENT))
 > 445			return POLLHUP;
   446	
   447		poll_wait(fp, &st->disrupt_wait, wait);
   448	
   449		seq = le32_to_cpu(st->clk->seq_count);
   450		if (atomic_read(&fst->seq) != seq)
   451			return POLLIN | POLLRDNORM;
   452	
   453		return 0;
   454	}
   455	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* drivers/ptp/ptp_vmclock.c:445:24: sparse: sparse: incorrect type in return expression (different base types)
@ 2026-03-11 15:44 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-03-11 15:44 UTC (permalink / raw)
  To: Babis Chalios
  Cc: oe-kbuild-all, linux-kernel, Jakub Kicinski, David Woodhouse,
	Takahiro Itazuri

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b29fb8829bff243512bb8c8908fd39406f9fd4c3
commit: 3b1526ddb25452385b52f2588b655f524a57070b ptp: vmclock: support device notifications
date:   5 weeks ago
config: x86_64-randconfig-123-20260311 (https://download.01.org/0day-ci/archive/20260311/202603112306.7c5SVcUv-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260311/202603112306.7c5SVcUv-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/202603112306.7c5SVcUv-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/ptp/ptp_vmclock.c:445:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __poll_t @@     got int @@
   drivers/ptp/ptp_vmclock.c:445:24: sparse:     expected restricted __poll_t
   drivers/ptp/ptp_vmclock.c:445:24: sparse:     got int
   drivers/ptp/ptp_vmclock.c:451:31: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __poll_t @@     got int @@
   drivers/ptp/ptp_vmclock.c:451:31: sparse:     expected restricted __poll_t
   drivers/ptp/ptp_vmclock.c:451:31: sparse:     got int

vim +445 drivers/ptp/ptp_vmclock.c

   433	
   434	static __poll_t vmclock_miscdev_poll(struct file *fp, poll_table *wait)
   435	{
   436		struct vmclock_file_state *fst = fp->private_data;
   437		struct vmclock_state *st = fst->st;
   438		uint32_t seq;
   439	
   440		/*
   441		 * Hypervisor will not send us any notifications, so fail immediately
   442		 * to avoid having caller sleeping for ever.
   443		 */
   444		if (!(le64_to_cpu(st->clk->flags) & VMCLOCK_FLAG_NOTIFICATION_PRESENT))
 > 445			return POLLHUP;
   446	
   447		poll_wait(fp, &st->disrupt_wait, wait);
   448	
   449		seq = le32_to_cpu(st->clk->seq_count);
   450		if (atomic_read(&fst->seq) != seq)
   451			return POLLIN | POLLRDNORM;
   452	
   453		return 0;
   454	}
   455	

-- 
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:[~2026-06-22 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 13:53 drivers/ptp/ptp_vmclock.c:445:24: sparse: sparse: incorrect type in return expression (different base types) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-11 15:44 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.