llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qais Yousef <qyousef@layalina.io>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [qais-yousef:remove-margins 1/2] kernel/sched/pelt.c:474:15: warning: no previous prototype for function 'approximate_util_avg'
Date: Wed, 19 Jul 2023 18:11:31 +0800	[thread overview]
Message-ID: <202307191801.PYkX2rhD-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: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20230719/202307191801.PYkX2rhD-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230719/202307191801.PYkX2rhD-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/202307191801.PYkX2rhD-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/build_policy.c:49:
   kernel/sched/pelt.c:476:2: error: must use 'struct' tag to refer to type 'sched_avg'
           sched_avg sa = {};
           ^
           struct 
   kernel/sched/pelt.c:478:17: error: use of undeclared identifier 'runtime'
           accumulate_sum(runtime, &sa, 0, 0, 1);
                          ^
   kernel/sched/pelt.c:479:24: error: too few arguments to function call, expected 2, have 1
           ___update_load_avg(&sa);
           ~~~~~~~~~~~~~~~~~~    ^
   kernel/sched/pelt.c:257:1: note: '___update_load_avg' declared here
   ___update_load_avg(struct sched_avg *sa, unsigned long load)
   ^
>> kernel/sched/pelt.c:474:15: warning: no previous prototype for function 'approximate_util_avg' [-Wmissing-prototypes]
   unsigned long approximate_util_avg(unsigned long util, u64 delta)
                 ^
   kernel/sched/pelt.c:474:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   unsigned long approximate_util_avg(unsigned long util, u64 delta)
   ^
   static 
   1 warning and 3 errors generated.


vim +/approximate_util_avg +474 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)

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

                 reply	other threads:[~2023-07-19 10:12 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=202307191801.PYkX2rhD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).