Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Easwar Hariharan <eahariha@linux.microsoft.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Wei Liu <wei.liu@kernel.org>,
	Michael Kelley <mhklinux@outlook.com>
Subject: [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
Date: Mon, 9 Dec 2024 13:50:41 +0800	[thread overview]
Message-ID: <202412091658.m9g4L9gw-lkp@intel.com> (raw)

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

             reply	other threads:[~2024-12-09  5:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09  5:50 kernel test robot [this message]
2024-12-09 16:52 ` [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 Easwar Hariharan
2024-12-09 18:38   ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202412091658.m9g4L9gw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=eahariha@linux.microsoft.com \
    --cc=llvm@lists.linux.dev \
    --cc=mhklinux@outlook.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox