All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [zen:5.14/prjc 123/229] kernel/sched/alt_core.c:4182:35: warning: no previous prototype for function 'schedule_user'
Date: Sun, 07 Nov 2021 12:06:52 +0800	[thread overview]
Message-ID: <202111071242.6ForvFYt-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 9925 bytes --]

Hi Alfred,

FYI, the error/warning still remains.

tree:   https://github.com/zen-kernel/zen-kernel 5.14/prjc
head:   f69b5edf3ec3ce17d9eef4ce92bdd4fc9b37e270
commit: faae5192fbbf1a8f2884acc5e90fd93270116449 [123/229] sched/alt: Remove USER_PRIO, TASK_USER_PRIO and MAX_USER_PRIO and MAX_USER_RT_PRIO
config: arm-buildonly-randconfig-r005-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/zen-kernel/zen-kernel/commit/faae5192fbbf1a8f2884acc5e90fd93270116449
        git remote add zen https://github.com/zen-kernel/zen-kernel
        git fetch --no-tags zen 5.14/prjc
        git checkout faae5192fbbf1a8f2884acc5e90fd93270116449
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

           ^
   kernel/sched/stats.h:159:20: note: 'sched_info_dequeue' declared here
   static inline void sched_info_dequeue(struct rq *rq, struct task_struct *t)
                      ^
   kernel/sched/alt_core.c:552:2: error: implicit declaration of function 'sched_info_queued' [-Werror,-Wimplicit-function-declaration]
           __SCHED_ENQUEUE_TASK(p, rq, flags);
           ^
   kernel/sched/pds_imp.h:171:2: note: expanded from macro '__SCHED_ENQUEUE_TASK'
           sched_info_queued(rq, p);                                       \
           ^
   kernel/sched/alt_core.c:736:6: warning: no previous prototype for function 'resched_curr' [-Wmissing-prototypes]
   void resched_curr(struct rq *rq)
        ^
   kernel/sched/alt_core.c:736:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void resched_curr(struct rq *rq)
   ^
   static 
   kernel/sched/alt_core.c:759:6: warning: no previous prototype for function 'resched_cpu' [-Wmissing-prototypes]
   void resched_cpu(int cpu)
        ^
   kernel/sched/alt_core.c:759:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void resched_cpu(int cpu)
   ^
   static 
   kernel/sched/alt_core.c:988:6: warning: no previous prototype for function 'hrtick_start' [-Wmissing-prototypes]
   void hrtick_start(struct rq *rq, u64 delay)
        ^
   kernel/sched/alt_core.c:988:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void hrtick_start(struct rq *rq, u64 delay)
   ^
   static 
   kernel/sched/alt_core.c:1849:5: error: no member named 'state' in 'struct task_struct'
           p->state = TASK_RUNNING;
           ~  ^
   kernel/sched/alt_core.c:2214:12: error: no member named 'state' in 'struct task_struct'
                   if (!(p->state & state))
                         ~  ^
   kernel/sched/alt_core.c:2219:6: error: no member named 'state' in 'struct task_struct'
                   p->state = TASK_RUNNING;
                   ~  ^
   kernel/sched/alt_core.c:2232:11: error: no member named 'state' in 'struct task_struct'
           if (!(p->state & state))
                 ~  ^
   kernel/sched/alt_core.c:2394:14: error: no member named 'state' in 'struct task_struct'
                   switch (p->state) {
                           ~  ^
   kernel/sched/alt_core.c:2470:5: error: no member named 'state' in 'struct task_struct'
           p->state = TASK_NEW;
           ~  ^
   kernel/sched/alt_core.c:2636:5: error: no member named 'state' in 'struct task_struct'
           p->state = TASK_RUNNING;
           ~  ^
   kernel/sched/alt_core.c:2989:21: error: no member named 'state' in 'struct task_struct'
           prev_state = prev->state;
                        ~~~~  ^
   kernel/sched/alt_core.c:3046:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
           struct rq *rq;
                      ^
   kernel/sched/alt_core.c:3131:15: error: conflicting types for 'nr_running'
   unsigned long nr_running(void)
                 ^
   include/linux/sched/stat.h:20:21: note: previous declaration is here
   extern unsigned int nr_running(void);
                       ^
   kernel/sched/alt_core.c:3178:15: error: conflicting types for 'nr_iowait_cpu'
   unsigned long nr_iowait_cpu(int cpu)
                 ^
   include/linux/sched/stat.h:23:21: note: previous declaration is here
   extern unsigned int nr_iowait_cpu(int cpu);
                       ^
   kernel/sched/alt_core.c:3213:15: error: conflicting types for 'nr_iowait'
   unsigned long nr_iowait(void)
                 ^
   include/linux/sched/stat.h:22:21: note: previous declaration is here
   extern unsigned int nr_iowait(void);
                       ^
   kernel/sched/alt_core.c:3359:2: error: implicit declaration of function 'psi_task_tick' [-Werror,-Wimplicit-function-declaration]
           psi_task_tick(rq);
           ^
   kernel/sched/alt_core.c:3996:21: error: no member named 'state' in 'struct task_struct'
           prev_state = prev->state;
                        ~~~~  ^
   kernel/sched/alt_core.c:3997:52: error: no member named 'state' in 'struct task_struct'
           if (!preempt && prev_state && prev_state == prev->state) {
                                                       ~~~~  ^
   kernel/sched/alt_core.c:3999:10: error: no member named 'state' in 'struct task_struct'
                           prev->state = TASK_RUNNING;
                           ~~~~  ^
   kernel/sched/alt_core.c:4100:12: error: no member named 'state' in 'struct task_struct'
           if (!tsk->state)
                ~~~  ^
   kernel/sched/alt_core.c:4175:24: error: no member named 'state' in 'struct task_struct'
           WARN_ON_ONCE(current->state);
                        ~~~~~~~  ^
   include/asm-generic/bug.h:179:41: note: expanded from macro 'WARN_ON_ONCE'
   #define WARN_ON_ONCE(condition) WARN_ON(condition)
                                           ^~~~~~~~~
   include/asm-generic/bug.h:166:25: note: expanded from macro 'WARN_ON'
           int __ret_warn_on = !!(condition);                              \
                                  ^~~~~~~~~
>> kernel/sched/alt_core.c:4182:35: warning: no previous prototype for function 'schedule_user' [-Wmissing-prototypes]
   asmlinkage __visible void __sched schedule_user(void)
                                     ^
   kernel/sched/alt_core.c:4182:22: note: declare 'static' if the function is not intended to be used outside of this translation unit
   asmlinkage __visible void __sched schedule_user(void)
                        ^
                        static 
   kernel/sched/alt_core.c:5464:5: warning: attribute declaration must precede definition [-Wignored-attributes]
   int __sched _cond_resched(void)
       ^
   include/linux/sched/debug.h:46:18: note: expanded from macro '__sched'
   #define __sched         __section(".sched.text")
                           ^
   include/linux/compiler_attributes.h:277:56: note: expanded from macro '__section'
   #define __section(section)              __attribute__((__section__(section)))
                                                          ^
   include/linux/sched.h:1957:19: note: previous definition is here
   static inline int _cond_resched(void)
                     ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   6 warnings and 20 errors generated.


vim +/schedule_user +4182 kernel/sched/alt_core.c

f746b5817d3274 Alfred Chen 2019-08-19  4180  
ff5e32d4191742 Alfred Chen 2021-01-26  4181  #if defined(CONFIG_CONTEXT_TRACKING) && !defined(CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK)
f746b5817d3274 Alfred Chen 2019-08-19 @4182  asmlinkage __visible void __sched schedule_user(void)
f746b5817d3274 Alfred Chen 2019-08-19  4183  {
f746b5817d3274 Alfred Chen 2019-08-19  4184  	/*
f746b5817d3274 Alfred Chen 2019-08-19  4185  	 * If we come here after a random call to set_need_resched(),
f746b5817d3274 Alfred Chen 2019-08-19  4186  	 * or we have been woken up remotely but the IPI has not yet arrived,
f746b5817d3274 Alfred Chen 2019-08-19  4187  	 * we haven't yet exited the RCU idle mode. Do it here manually until
f746b5817d3274 Alfred Chen 2019-08-19  4188  	 * we find a better solution.
f746b5817d3274 Alfred Chen 2019-08-19  4189  	 *
f746b5817d3274 Alfred Chen 2019-08-19  4190  	 * NB: There are buggy callers of this function.  Ideally we
f746b5817d3274 Alfred Chen 2019-08-19  4191  	 * should warn if prev_state != CONTEXT_USER, but that will trigger
f746b5817d3274 Alfred Chen 2019-08-19  4192  	 * too frequently to make sense yet.
f746b5817d3274 Alfred Chen 2019-08-19  4193  	 */
f746b5817d3274 Alfred Chen 2019-08-19  4194  	enum ctx_state prev_state = exception_enter();
f746b5817d3274 Alfred Chen 2019-08-19  4195  	schedule();
f746b5817d3274 Alfred Chen 2019-08-19  4196  	exception_exit(prev_state);
f746b5817d3274 Alfred Chen 2019-08-19  4197  }
f746b5817d3274 Alfred Chen 2019-08-19  4198  #endif
f746b5817d3274 Alfred Chen 2019-08-19  4199  

:::::: The code at line 4182 was first introduced by commit
:::::: f746b5817d3274fa4f458f87f6b452e7304b1d64 Project C v5.7.5-r2

:::::: TO: Alfred Chen <cchalpha@gmail.com>
:::::: CC: Alfred Chen <cchalpha@gmail.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31940 bytes --]

                 reply	other threads:[~2021-11-07  4:06 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=202111071242.6ForvFYt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.