All of lore.kernel.org
 help / color / mirror / Atom feed
* [zen:5.16/prjc 58/262] kernel/sched/alt_core.c:1528:6: warning: no previous prototype for function 'sched_set_stop_task'
@ 2022-01-31  5:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-31  5:06 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/zen-kernel/zen-kernel 5.16/prjc
head:   afc445ebe063a19bcb9288bb90a35b4a57c445b0
commit: 505879af5d96055f5670272c56d75f6994971567 [58/262] sched/alt: Fix compilation erro in pelt.c
config: x86_64-randconfig-a011-20220131 (https://download.01.org/0day-ci/archive/20220131/202201311343.ePwmfORe-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2cdbaca3943a4d6259119f185656328bd3805b68)
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
        # https://github.com/zen-kernel/zen-kernel/commit/505879af5d96055f5670272c56d75f6994971567
        git remote add zen https://github.com/zen-kernel/zen-kernel
        git fetch --no-tags zen 5.16/prjc
        git checkout 505879af5d96055f5670272c56d75f6994971567
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/sched/

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 >>):

                               ^~~~~~~~~
   include/linux/compiler_types.h:323:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
                                ^~~~~~~~~
   include/linux/compiler_types.h:315:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
   kernel/sched/alt_core.c:1100:16: error: no member named 'cpu' in 'struct task_struct'
           WRITE_ONCE(p->cpu, cpu);
                      ~  ^
   include/asm-generic/rwonce.h:60:33: note: expanded from macro 'WRITE_ONCE'
           compiletime_assert_rwonce_type(x);                              \
                                          ^
   include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
                                            ^
   include/linux/compiler_types.h:303:10: note: expanded from macro '__native_word'
            sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
                   ^
   include/linux/compiler_types.h:335:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
                               ^~~~~~~~~
   include/linux/compiler_types.h:323:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
                                ^~~~~~~~~
   include/linux/compiler_types.h:315:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
   kernel/sched/alt_core.c:1100:16: error: no member named 'cpu' in 'struct task_struct'
           WRITE_ONCE(p->cpu, cpu);
                      ~  ^
   include/asm-generic/rwonce.h:60:33: note: expanded from macro 'WRITE_ONCE'
           compiletime_assert_rwonce_type(x);                              \
                                          ^
   include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
                                            ^
   include/linux/compiler_types.h:303:38: note: expanded from macro '__native_word'
            sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
                                               ^
   include/linux/compiler_types.h:335:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
                               ^~~~~~~~~
   include/linux/compiler_types.h:323:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
                                ^~~~~~~~~
   include/linux/compiler_types.h:315:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
   kernel/sched/alt_core.c:1100:16: error: no member named 'cpu' in 'struct task_struct'
           WRITE_ONCE(p->cpu, cpu);
                      ~  ^
   include/asm-generic/rwonce.h:60:33: note: expanded from macro 'WRITE_ONCE'
           compiletime_assert_rwonce_type(x);                              \
                                          ^
   include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
                                                         ^
   include/linux/compiler_types.h:335:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
                               ^~~~~~~~~
   include/linux/compiler_types.h:323:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
                                ^~~~~~~~~
   include/linux/compiler_types.h:315:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
   kernel/sched/alt_core.c:1100:16: error: no member named 'cpu' in 'struct task_struct'
           WRITE_ONCE(p->cpu, cpu);
                      ~  ^
   include/asm-generic/rwonce.h:61:15: note: expanded from macro 'WRITE_ONCE'
           __WRITE_ONCE(x, val);                                           \
                        ^
   include/asm-generic/rwonce.h:55:20: note: expanded from macro '__WRITE_ONCE'
           *(volatile typeof(x) *)&(x) = (val);                            \
                             ^
   kernel/sched/alt_core.c:1100:16: error: no member named 'cpu' in 'struct task_struct'
           WRITE_ONCE(p->cpu, cpu);
                      ~  ^
   include/asm-generic/rwonce.h:61:15: note: expanded from macro 'WRITE_ONCE'
           __WRITE_ONCE(x, val);                                           \
                        ^
   include/asm-generic/rwonce.h:55:27: note: expanded from macro '__WRITE_ONCE'
           *(volatile typeof(x) *)&(x) = (val);                            \
                                    ^
   kernel/sched/alt_core.c:1307:15: error: conflicting types for 'wait_task_inactive'
   unsigned long wait_task_inactive(struct task_struct *p, long match_state)
                 ^
   include/linux/sched.h:1980:22: note: previous declaration is here
   extern unsigned long wait_task_inactive(struct task_struct *, unsigned int match_state);
                        ^
   kernel/sched/alt_core.c:1330:35: error: no member named 'state' in 'struct task_struct'
                           if (match_state && unlikely(p->state != match_state))
                                                       ~  ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   kernel/sched/alt_core.c:1345:26: error: no member named 'state' in 'struct task_struct'
                   if (!match_state || p->state == match_state)
                                       ~  ^
>> kernel/sched/alt_core.c:1528:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
   void sched_set_stop_task(int cpu, struct task_struct *stop)
        ^
   kernel/sched/alt_core.c:1528:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void sched_set_stop_task(int cpu, struct task_struct *stop)
   ^
   static 
   kernel/sched/alt_core.c:1620:28: error: no member named 'state' in 'struct task_struct'
           if (task_running(p) || p->state == TASK_WAKING) {
                                  ~  ^
   kernel/sched/alt_core.c:1698:5: error: no member named 'state' in 'struct task_struct'
           p->state = TASK_RUNNING;
           ~  ^
   kernel/sched/alt_core.c:2047:12: error: no member named 'state' in 'struct task_struct'; did you mean 'stime'?
                   if (!(p->state & state))
                            ^~~~~
                            stime
   include/linux/sched.h:1022:9: note: 'stime' declared here
           u64                             stime;
                                           ^
   kernel/sched/alt_core.c:2052:6: error: no member named 'state' in 'struct task_struct'
                   p->state = TASK_RUNNING;
                   ~  ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   4 warnings and 20 errors generated.


vim +/sched_set_stop_task +1528 kernel/sched/alt_core.c

1d7e12db7a510f Alfred Chen 2019-08-19  1527  
1d7e12db7a510f Alfred Chen 2019-08-19 @1528  void sched_set_stop_task(int cpu, struct task_struct *stop)
1d7e12db7a510f Alfred Chen 2019-08-19  1529  {
1d7e12db7a510f Alfred Chen 2019-08-19  1530  	struct sched_param stop_param = { .sched_priority = STOP_PRIO };
1d7e12db7a510f Alfred Chen 2019-08-19  1531  	struct sched_param start_param = { .sched_priority = 0 };
1d7e12db7a510f Alfred Chen 2019-08-19  1532  	struct task_struct *old_stop = cpu_rq(cpu)->stop;
1d7e12db7a510f Alfred Chen 2019-08-19  1533  
1d7e12db7a510f Alfred Chen 2019-08-19  1534  	if (stop) {
1d7e12db7a510f Alfred Chen 2019-08-19  1535  		/*
1d7e12db7a510f Alfred Chen 2019-08-19  1536  		 * Make it appear like a SCHED_FIFO task, its something
1d7e12db7a510f Alfred Chen 2019-08-19  1537  		 * userspace knows about and won't get confused about.
1d7e12db7a510f Alfred Chen 2019-08-19  1538  		 *
1d7e12db7a510f Alfred Chen 2019-08-19  1539  		 * Also, it will make PI more or less work without too
1d7e12db7a510f Alfred Chen 2019-08-19  1540  		 * much confusion -- but then, stop work should not
1d7e12db7a510f Alfred Chen 2019-08-19  1541  		 * rely on PI working anyway.
1d7e12db7a510f Alfred Chen 2019-08-19  1542  		 */
1d7e12db7a510f Alfred Chen 2019-08-19  1543  		sched_setscheduler_nocheck(stop, SCHED_FIFO, &stop_param);
1d7e12db7a510f Alfred Chen 2019-08-19  1544  	}
1d7e12db7a510f Alfred Chen 2019-08-19  1545  
1d7e12db7a510f Alfred Chen 2019-08-19  1546  	cpu_rq(cpu)->stop = stop;
1d7e12db7a510f Alfred Chen 2019-08-19  1547  
1d7e12db7a510f Alfred Chen 2019-08-19  1548  	if (old_stop) {
1d7e12db7a510f Alfred Chen 2019-08-19  1549  		/*
1d7e12db7a510f Alfred Chen 2019-08-19  1550  		 * Reset it back to a normal scheduling policy so that
1d7e12db7a510f Alfred Chen 2019-08-19  1551  		 * it can die in pieces.
1d7e12db7a510f Alfred Chen 2019-08-19  1552  		 */
1d7e12db7a510f Alfred Chen 2019-08-19  1553  		sched_setscheduler_nocheck(old_stop, SCHED_NORMAL, &start_param);
1d7e12db7a510f Alfred Chen 2019-08-19  1554  	}
1d7e12db7a510f Alfred Chen 2019-08-19  1555  }
1d7e12db7a510f Alfred Chen 2019-08-19  1556  

:::::: The code at line 1528 was first introduced by commit
:::::: 1d7e12db7a510fe6b80d8a6450c919b07db1cf76 Project C v5.7.5-r2

:::::: TO: Alfred Chen <cchalpha@gmail.com>
:::::: CC: Torge Matthies <openglfreak@googlemail.com>

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

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

only message in thread, other threads:[~2022-01-31  5:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-31  5:06 [zen:5.16/prjc 58/262] kernel/sched/alt_core.c:1528:6: warning: no previous prototype for function 'sched_set_stop_task' 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.