Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vernon Yang <yanglincheng@kylinos.cn>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	0day robot <lkp@intel.com>
Subject: kernel/bpf/helpers.c:2833:28: error: call to undeclared function 'cgroup_psi'; ISO C99 and later do not support implicit function declarations
Date: Tue, 12 May 2026 00:51:18 +0200	[thread overview]
Message-ID: <202605120005.IWDpu87d-lkp@intel.com> (raw)

tree:   https://github.com/intel-lab-lkp/linux/commits/Vernon-Yang/psi-add-psi_group_flush_stats-function/20260511-160117
head:   935bf63d5c33c8fc0d26f2092de20e4720f4b2ae
commit: 46f204179b5fd01c11fa4999b7a94beccfe84ea4 bpf: add bpf_cgroup_{flush_stats,stall} function
date:   15 hours ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260512/202605120005.IWDpu87d-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260512/202605120005.IWDpu87d-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/202605120005.IWDpu87d-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/bpf/helpers.c:2831:14: warning: declaration of 'enum psi_states' will not be visible outside of this function [-Wvisibility]
    2831 |                                            enum psi_states states)
         |                                                 ^
   kernel/bpf/helpers.c:2831:25: error: variable has incomplete type 'enum psi_states'
    2831 |                                            enum psi_states states)
         |                                                            ^
   kernel/bpf/helpers.c:2831:14: note: forward declaration of 'enum psi_states'
    2831 |                                            enum psi_states states)
         |                                                 ^
>> kernel/bpf/helpers.c:2833:28: error: call to undeclared function 'cgroup_psi'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2833 |         struct psi_group *group = cgroup_psi(cgrp);
         |                                   ^
>> kernel/bpf/helpers.c:2833:20: error: incompatible integer to pointer conversion initializing 'struct psi_group *' with an expression of type 'int' [-Wint-conversion]
    2833 |         struct psi_group *group = cgroup_psi(cgrp);
         |                           ^       ~~~~~~~~~~~~~~~~
   kernel/bpf/helpers.c:2835:24: error: no member named 'total' in 'struct psi_group'
    2835 |         return div_u64(group->total[PSI_AVGS][states], NSEC_PER_MSEC);
         |                        ~~~~~  ^
   kernel/bpf/helpers.c:2835:30: error: use of undeclared identifier 'PSI_AVGS'
    2835 |         return div_u64(group->total[PSI_AVGS][states], NSEC_PER_MSEC);
         |                                     ^
   kernel/bpf/helpers.c:2844:28: error: call to undeclared function 'cgroup_psi'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2844 |         struct psi_group *group = cgroup_psi(cgrp);
         |                                   ^
   kernel/bpf/helpers.c:2844:20: error: incompatible integer to pointer conversion initializing 'struct psi_group *' with an expression of type 'int' [-Wint-conversion]
    2844 |         struct psi_group *group = cgroup_psi(cgrp);
         |                           ^       ~~~~~~~~~~~~~~~~
   kernel/bpf/helpers.c:2846:2: error: call to undeclared function 'psi_group_flush_stats'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2846 |         psi_group_flush_stats(group);
         |         ^
   1 warning and 8 errors generated.


vim +/cgroup_psi +2833 kernel/bpf/helpers.c

  2822	
  2823	/**
  2824	 * bpf_cgroup_stall - acquire the total stall time of cgroup
  2825	 * @cgrp: cgroup struct
  2826	 * @states: psi states
  2827	 *
  2828	 * Return the total stall time.
  2829	 */
  2830	__bpf_kfunc unsigned long bpf_cgroup_stall(struct cgroup *cgrp,
  2831						   enum psi_states states)
  2832	{
> 2833		struct psi_group *group = cgroup_psi(cgrp);
  2834	
  2835		return div_u64(group->total[PSI_AVGS][states], NSEC_PER_MSEC);
  2836	}
  2837	

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

                 reply	other threads:[~2026-05-11 22:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202605120005.IWDpu87d-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yanglincheng@kylinos.cn \
    /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