All of lore.kernel.org
 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:2893:71: error: variable has incomplete type 'enum psi_states'
Date: Sat, 09 May 2026 23:57:53 +0200	[thread overview]
Message-ID: <202605092340.hZ7VIqHR-lkp@intel.com> (raw)

tree:   https://github.com/intel-lab-lkp/linux/commits/Vernon-Yang/psi-add-psi_group_flush_stats-function/20260509-210713
head:   4a4580a71f5884e16d331476b601322cc2d41af7
commit: edf653aa3964af51ae2f2b180bcb0f6cfa26c8f7 bpf: add bpf_cgroup_{flush_stats,stall} function
date:   9 hours ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260509/202605092340.hZ7VIqHR-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/20260509/202605092340.hZ7VIqHR-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/202605092340.hZ7VIqHR-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/bpf/helpers.c:2893:60: warning: declaration of 'enum psi_states' will not be visible outside of this function [-Wvisibility]
    2893 | __bpf_kfunc u64 bpf_cgroup_stall(struct cgroup *cgrp, enum psi_states states)
         |                                                            ^
>> kernel/bpf/helpers.c:2893:71: error: variable has incomplete type 'enum psi_states'
    2893 | __bpf_kfunc u64 bpf_cgroup_stall(struct cgroup *cgrp, enum psi_states states)
         |                                                                       ^
   kernel/bpf/helpers.c:2893:60: note: forward declaration of 'enum psi_states'
    2893 | __bpf_kfunc u64 bpf_cgroup_stall(struct cgroup *cgrp, enum psi_states states)
         |                                                            ^
>> kernel/bpf/helpers.c:2897:40: error: use of undeclared identifier 'NR_PSI_STATES'; did you mean 'NR_NODE_STATES'?
    2897 |         if (unlikely(!group || (u32)states >= NR_PSI_STATES - 1))
         |                                               ^~~~~~~~~~~~~
         |                                               NR_NODE_STATES
   include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
      77 | # define unlikely(x)    __builtin_expect(!!(x), 0)
         |                                             ^
   include/linux/nodemask.h:396:2: note: 'NR_NODE_STATES' declared here
     396 |         NR_NODE_STATES
         |         ^
>> kernel/bpf/helpers.c:2900:24: error: no member named 'total' in 'struct psi_group'
    2900 |         return div_u64(group->total[PSI_AVGS][states], NSEC_PER_MSEC);
         |                        ~~~~~  ^
>> kernel/bpf/helpers.c:2900:30: error: use of undeclared identifier 'PSI_AVGS'
    2900 |         return div_u64(group->total[PSI_AVGS][states], NSEC_PER_MSEC);
         |                                     ^
>> kernel/bpf/helpers.c:2914:2: error: call to undeclared function 'psi_group_flush_stats'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    2914 |         psi_group_flush_stats(group);
         |         ^
   1 warning and 5 errors generated.


vim +2893 kernel/bpf/helpers.c

  2885	
  2886	/**
  2887	 * bpf_cgroup_stall - acquire the total stall time of cgroup
  2888	 * @cgrp: cgroup struct
  2889	 * @states: psi states
  2890	 *
  2891	 * Return the total stall time.
  2892	 */
> 2893	__bpf_kfunc u64 bpf_cgroup_stall(struct cgroup *cgrp, enum psi_states states)
  2894	{
  2895		struct psi_group *group = cgroup_psi(cgrp);
  2896	
> 2897		if (unlikely(!group || (u32)states >= NR_PSI_STATES - 1))
  2898			return (u64)-1;
  2899	
> 2900		return div_u64(group->total[PSI_AVGS][states], NSEC_PER_MSEC);
  2901	}
  2902	
  2903	/**
  2904	 * bpf_cgroup_flush_stats - Flush cgroup's statistics
  2905	 * @cgrp: cgroup struct
  2906	 */
  2907	__bpf_kfunc void bpf_cgroup_flush_stats(struct cgroup *cgrp)
  2908	{
  2909		struct psi_group *group = cgroup_psi(cgrp);
  2910	
  2911		if (unlikely(!group))
  2912			return;
  2913	
> 2914		psi_group_flush_stats(group);
  2915	}
  2916	#endif /* CONFIG_CGROUPS */
  2917	

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

                 reply	other threads:[~2026-05-09 21:58 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=202605092340.hZ7VIqHR-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 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.