All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qais Yousef <qyousef@layalina.io>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Wed, 19 Jul 2023 10:35:08 +0800	[thread overview]
Message-ID: <202307191002.LOUDaHij-lkp@intel.com> (raw)

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

                 reply	other threads:[~2023-07-19  2:35 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=202307191002.LOUDaHij-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=qyousef@layalina.io \
    /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.