All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel/bpf/helpers.c:2893:71: error: parameter 2 ('states') has incomplete type
@ 2026-05-09 21:27 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-09 21:27 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Vernon Yang <yanglincheng@kylinos.cn>
CC: 0day robot <lkp@intel.com>

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:   8 hours ago
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: i386-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260509/202605092332.XSLv5Bnu-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260509/202605092332.XSLv5Bnu-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/r/202605092332.XSLv5Bnu-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> kernel/bpf/helpers.c:2893:60: warning: 'enum psi_states' declared inside parameter list will not be visible outside of this definition or declaration
    2893 | __bpf_kfunc u64 bpf_cgroup_stall(struct cgroup *cgrp, enum psi_states states)
         |                                                            ^~~~~~~~~~
>> kernel/bpf/helpers.c:2893:71: error: parameter 2 ('states') has incomplete type
    2893 | __bpf_kfunc u64 bpf_cgroup_stall(struct cgroup *cgrp, enum psi_states states)
         |                                                       ~~~~~~~~~~~~~~~~^~~~~~
>> kernel/bpf/helpers.c:2893:17: error: function declaration isn't a prototype [-Werror=strict-prototypes]
    2893 | __bpf_kfunc u64 bpf_cgroup_stall(struct cgroup *cgrp, enum psi_states states)
         |                 ^~~~~~~~~~~~~~~~
   In file included from ./include/uapi/linux/filter.h:9,
                    from ./include/linux/bpf.h:8,
                    from kernel/bpf/helpers.c:4:
   kernel/bpf/helpers.c: In function 'bpf_cgroup_stall':
>> kernel/bpf/helpers.c:2897:47: error: 'NR_PSI_STATES' undeclared (first use in this function); did you mean 'NR_NODE_STATES'?
    2897 |         if (unlikely(!group || (u32)states >= NR_PSI_STATES - 1))
         |                                               ^~~~~~~~~~~~~
   ./include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
      77 | # define unlikely(x)    __builtin_expect(!!(x), 0)
         |                                             ^
   kernel/bpf/helpers.c:2897:47: note: each undeclared identifier is reported only once for each function it appears in
    2897 |         if (unlikely(!group || (u32)states >= NR_PSI_STATES - 1))
         |                                               ^~~~~~~~~~~~~
   ./include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
      77 | # define unlikely(x)    __builtin_expect(!!(x), 0)
         |                                             ^
>> kernel/bpf/helpers.c:2900:29: error: 'struct psi_group' has no member named 'total'
    2900 |         return div_u64(group->total[PSI_AVGS][states], NSEC_PER_MSEC);
         |                             ^~
>> kernel/bpf/helpers.c:2900:37: error: 'PSI_AVGS' undeclared (first use in this function)
    2900 |         return div_u64(group->total[PSI_AVGS][states], NSEC_PER_MSEC);
         |                                     ^~~~~~~~
   kernel/bpf/helpers.c: In function 'bpf_cgroup_flush_stats':
>> kernel/bpf/helpers.c:2914:9: error: implicit declaration of function 'psi_group_flush_stats'; did you mean 'bpf_cgroup_flush_stats'? [-Wimplicit-function-declaration]
    2914 |         psi_group_flush_stats(group);
         |         ^~~~~~~~~~~~~~~~~~~~~
         |         bpf_cgroup_flush_stats
   kernel/bpf/helpers.c: In function 'bpf_cgroup_stall':
>> kernel/bpf/helpers.c:2901:1: warning: control reaches end of non-void function [-Wreturn-type]
    2901 | }
         | ^
   cc1: some warnings being treated as errors


vim +2893 kernel/bpf/helpers.c

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-09 21:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 21:27 kernel/bpf/helpers.c:2893:71: error: parameter 2 ('states') has incomplete type 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.