Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [hyperv:hyperv-fixes 5/11] drivers/hv/vmbus_drv.c:2510:45: error: call to undeclared function 'secs_to_jiffies'; ISO C99 and later do not support implicit function declarations
@ 2024-12-09  5:50 kernel test robot
  2024-12-09 16:52 ` Easwar Hariharan
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2024-12-09  5:50 UTC (permalink / raw)
  To: Easwar Hariharan; +Cc: llvm, oe-kbuild-all, Wei Liu, Michael Kelley

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-fixes
head:   b8ea8cd0fbd358feee3e9172c5ef8afd671e0d11
commit: eced6df67f6b76889e80ded109a73ca5fac1e5cd [5/11] drivers: hv: Convert open-coded timeouts to secs_to_jiffies()
config: i386-buildonly-randconfig-004-20241209 (https://download.01.org/0day-ci/archive/20241209/202412091658.m9g4L9gw-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241209/202412091658.m9g4L9gw-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/202412091658.m9g4L9gw-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/hv/vmbus_drv.c:21:
   In file included from include/linux/hyperv.h:17:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/hv/vmbus_drv.c:21:
   include/linux/hyperv.h:646:2: warning: 'counted_by' should not be applied to an array with element of unknown size because 'struct gpa_range' is a struct type with a flexible array member. This will be an error in a future compiler version [-Wbounds-safety-counted-by-elt-type-unknown-size]
     646 |         struct gpa_range range[] __counted_by(rangecount);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/hv/vmbus_drv.c:2510:45: error: call to undeclared function 'secs_to_jiffies'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2510 |                 &vmbus_connection.ready_for_resume_event, secs_to_jiffies(10)) == 0)
         |                                                           ^
   2 warnings and 1 error generated.


vim +/secs_to_jiffies +2510 drivers/hv/vmbus_drv.c

  2472	
  2473	static int vmbus_bus_resume(struct device *dev)
  2474	{
  2475		struct vmbus_channel_msginfo *msginfo;
  2476		size_t msgsize;
  2477		int ret;
  2478	
  2479		vmbus_connection.ignore_any_offer_msg = false;
  2480	
  2481		/*
  2482		 * We only use the 'vmbus_proto_version', which was in use before
  2483		 * hibernation, to re-negotiate with the host.
  2484		 */
  2485		if (!vmbus_proto_version) {
  2486			pr_err("Invalid proto version = 0x%x\n", vmbus_proto_version);
  2487			return -EINVAL;
  2488		}
  2489	
  2490		msgsize = sizeof(*msginfo) +
  2491			  sizeof(struct vmbus_channel_initiate_contact);
  2492	
  2493		msginfo = kzalloc(msgsize, GFP_KERNEL);
  2494	
  2495		if (msginfo == NULL)
  2496			return -ENOMEM;
  2497	
  2498		ret = vmbus_negotiate_version(msginfo, vmbus_proto_version);
  2499	
  2500		kfree(msginfo);
  2501	
  2502		if (ret != 0)
  2503			return ret;
  2504	
  2505		WARN_ON(atomic_read(&vmbus_connection.nr_chan_fixup_on_resume) == 0);
  2506	
  2507		vmbus_request_offers();
  2508	
  2509		if (wait_for_completion_timeout(
> 2510			&vmbus_connection.ready_for_resume_event, secs_to_jiffies(10)) == 0)
  2511			pr_err("Some vmbus device is missing after suspending?\n");
  2512	
  2513		/* Reset the event for the next suspend. */
  2514		reinit_completion(&vmbus_connection.ready_for_suspend_event);
  2515	
  2516		return 0;
  2517	}
  2518	#else
  2519	#define vmbus_bus_suspend NULL
  2520	#define vmbus_bus_resume NULL
  2521	#endif /* CONFIG_PM_SLEEP */
  2522	

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

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

* Re: [hyperv:hyperv-fixes 5/11] drivers/hv/vmbus_drv.c:2510:45: error: call to undeclared function 'secs_to_jiffies'; ISO C99 and later do not support implicit function declarations
  2024-12-09  5:50 [hyperv:hyperv-fixes 5/11] drivers/hv/vmbus_drv.c:2510:45: error: call to undeclared function 'secs_to_jiffies'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2024-12-09 16:52 ` Easwar Hariharan
  2024-12-09 18:38   ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Easwar Hariharan @ 2024-12-09 16:52 UTC (permalink / raw)
  To: Wei Liu; +Cc: eahariha, llvm, oe-kbuild-all, Michael Kelley, kernel test robot

On 12/8/2024 9:50 PM, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-fixes
> head:   b8ea8cd0fbd358feee3e9172c5ef8afd671e0d11
> commit: eced6df67f6b76889e80ded109a73ca5fac1e5cd [5/11] drivers: hv: Convert open-coded timeouts to secs_to_jiffies()
> config: i386-buildonly-randconfig-004-20241209 (https://download.01.org/0day-ci/archive/20241209/202412091658.m9g4L9gw-lkp@intel.com/config)
> compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241209/202412091658.m9g4L9gw-lkp@intel.com/reproduce)
> 

Hi Wei,

It appears hyperv-fixes needs to be rebased on 6.13-rc1 to provide
secs_to_jiffies() from commit b35108a51cf7bab58d7eace1267d7965978bcdb8
(jiffies: Define secs_to_jiffies()). I suppose you'll do that before
sending the PR to Linus.

Thanks,
Easwar

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

* Re: [hyperv:hyperv-fixes 5/11] drivers/hv/vmbus_drv.c:2510:45: error: call to undeclared function 'secs_to_jiffies'; ISO C99 and later do not support implicit function declarations
  2024-12-09 16:52 ` Easwar Hariharan
@ 2024-12-09 18:38   ` Wei Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2024-12-09 18:38 UTC (permalink / raw)
  To: Easwar Hariharan
  Cc: Wei Liu, llvm, oe-kbuild-all, Michael Kelley, kernel test robot

On Mon, Dec 09, 2024 at 08:52:27AM -0800, Easwar Hariharan wrote:
> On 12/8/2024 9:50 PM, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-fixes
> > head:   b8ea8cd0fbd358feee3e9172c5ef8afd671e0d11
> > commit: eced6df67f6b76889e80ded109a73ca5fac1e5cd [5/11] drivers: hv: Convert open-coded timeouts to secs_to_jiffies()
> > config: i386-buildonly-randconfig-004-20241209 (https://download.01.org/0day-ci/archive/20241209/202412091658.m9g4L9gw-lkp@intel.com/config)
> > compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241209/202412091658.m9g4L9gw-lkp@intel.com/reproduce)
> > 
> 
> Hi Wei,
> 
> It appears hyperv-fixes needs to be rebased on 6.13-rc1 to provide
> secs_to_jiffies() from commit b35108a51cf7bab58d7eace1267d7965978bcdb8
> (jiffies: Define secs_to_jiffies()). I suppose you'll do that before
> sending the PR to Linus.

Yes. I will fix that up.

I originally based it on 6.13-rc1, but that tag was broken. Now that
6.13-rc2 is out, I'll rebase on that.


> 
> Thanks,
> Easwar

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

end of thread, other threads:[~2024-12-09 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09  5:50 [hyperv:hyperv-fixes 5/11] drivers/hv/vmbus_drv.c:2510:45: error: call to undeclared function 'secs_to_jiffies'; ISO C99 and later do not support implicit function declarations kernel test robot
2024-12-09 16:52 ` Easwar Hariharan
2024-12-09 18:38   ` Wei Liu

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