* [qais-yousef:remove-margins 1/2] kernel/sched/pelt.c:476:9: error: unknown type name 'sched_avg'; use 'struct' keyword to refer to the type
@ 2023-07-19 2:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-19 2:35 UTC (permalink / raw)
To: Qais Yousef; +Cc: oe-kbuild-all
tree: https://github.com/qais-yousef/linux remove-margins
head: f49a0141f6fa8e9f6dd3b8cacae3531f90c74343
commit: 88a5e45c9556977f198d903b4c19ec50d91ade9f [1/2] sched/pelt: Add a new function to approximate the future util_avg value
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20230719/202307191002.LOUDaHij-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230719/202307191002.LOUDaHij-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/202307191002.LOUDaHij-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from kernel/sched/build_policy.c:49:
>> kernel/sched/pelt.c:474:15: warning: no previous prototype for 'approximate_util_avg' [-Wmissing-prototypes]
474 | unsigned long approximate_util_avg(unsigned long util, u64 delta)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/pelt.c: In function 'approximate_util_avg':
>> kernel/sched/pelt.c:476:9: error: unknown type name 'sched_avg'; use 'struct' keyword to refer to the type
476 | sched_avg sa = {};
| ^~~~~~~~~
| struct
>> kernel/sched/pelt.c:476:24: error: empty scalar initializer
476 | sched_avg sa = {};
| ^
kernel/sched/pelt.c:476:24: note: (near initialization for 'sa')
>> kernel/sched/pelt.c:478:24: error: 'runtime' undeclared (first use in this function); did you mean 'rdtime'?
478 | accumulate_sum(runtime, &sa, 0, 0, 1);
| ^~~~~~~
| rdtime
kernel/sched/pelt.c:478:24: note: each undeclared identifier is reported only once for each function it appears in
>> kernel/sched/pelt.c:478:33: error: passing argument 2 of 'accumulate_sum' from incompatible pointer type [-Werror=incompatible-pointer-types]
478 | accumulate_sum(runtime, &sa, 0, 0, 1);
| ^~~
| |
| int *
kernel/sched/pelt.c:102:45: note: expected 'struct sched_avg *' but argument is of type 'int *'
102 | accumulate_sum(u64 delta, struct sched_avg *sa,
| ~~~~~~~~~~~~~~~~~~^~
>> kernel/sched/pelt.c:479:28: error: passing argument 1 of '___update_load_avg' from incompatible pointer type [-Werror=incompatible-pointer-types]
479 | ___update_load_avg(&sa);
| ^~~
| |
| int *
kernel/sched/pelt.c:257:38: note: expected 'struct sched_avg *' but argument is of type 'int *'
257 | ___update_load_avg(struct sched_avg *sa, unsigned long load)
| ~~~~~~~~~~~~~~~~~~^~
>> kernel/sched/pelt.c:479:9: error: too few arguments to function '___update_load_avg'
479 | ___update_load_avg(&sa);
| ^~~~~~~~~~~~~~~~~~
kernel/sched/pelt.c:257:1: note: declared here
257 | ___update_load_avg(struct sched_avg *sa, unsigned long load)
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/pelt.c:481:18: error: request for member 'util_avg' in something not a structure or union
481 | return sa.util_avg;
| ^
kernel/sched/pelt.c:482:1: error: control reaches end of non-void function [-Werror=return-type]
482 | }
| ^
cc1: some warnings being treated as errors
vim +476 kernel/sched/pelt.c
469
470 /*
471 * Approximate the new util_avg value assuming an entity has continued to run
472 * for @delta ns.
473 */
> 474 unsigned long approximate_util_avg(unsigned long util, u64 delta)
475 {
> 476 sched_avg sa = {};
477
> 478 accumulate_sum(runtime, &sa, 0, 0, 1);
> 479 ___update_load_avg(&sa);
480
> 481 return sa.util_avg;
--
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:[~2023-07-19 2:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-19 2:35 [qais-yousef:remove-margins 1/2] kernel/sched/pelt.c:476:9: error: unknown type name 'sched_avg'; use 'struct' keyword to refer to the 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.