All of lore.kernel.org
 help / color / mirror / Atom feed
* [peterz-queue:sched/core 1/5] include/linux/compiler.h:55:45: error: invalid use of void expression
@ 2025-02-13 14:57 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-13 14:57 UTC (permalink / raw)
  To: zihan zhou; +Cc: oe-kbuild-all, Peter Zijlstra, Vincent Guittot

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head:   f5e5644f37620a7177ec30bf771fe90926ed9e7a
commit: a776cf5efa44410204ec367cd593ad56b9d3df5e [1/5] sched: Cancel the slice protection of the idle entity
config: csky-randconfig-001-20250213 (https://download.01.org/0day-ci/archive/20250213/202502132216.LCb0y45e-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250213/202502132216.LCb0y45e-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/202502132216.LCb0y45e-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/sched/fair.c: In function 'protect_slice':
   kernel/sched/fair.c:897:18: warning: statement with no effect [-Wunused-value]
     897 |         se->vlag == se->deadline;
         |         ~~~~~~~~~^~~~~~~~~~~~~~~
   In file included from include/linux/cleanup.h:5,
                    from include/linux/cpumask.h:10,
                    from include/linux/energy_model.h:4,
                    from kernel/sched/fair.c:23:
   kernel/sched/fair.c: In function 'cancel_protect_slice':
>> include/linux/compiler.h:55:45: error: invalid use of void expression
      55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                                             ^
   include/linux/compiler.h:57:52: note: in definition of macro '__trace_if_var'
      57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                    ^~~~
   kernel/sched/fair.c:902:9: note: in expansion of macro 'if'
     902 |         if (protect_slice(se))
         |         ^~
>> include/linux/compiler.h:55:45: error: invalid use of void expression
      55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                                             ^
   include/linux/compiler.h:57:61: note: in definition of macro '__trace_if_var'
      57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                             ^~~~
   kernel/sched/fair.c:902:9: note: in expansion of macro 'if'
     902 |         if (protect_slice(se))
         |         ^~
>> include/linux/compiler.h:55:45: error: invalid use of void expression
      55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                                             ^
   include/linux/compiler.h:68:10: note: in definition of macro '__trace_if_value'
      68 |         (cond) ?                                        \
         |          ^~~~
   include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
      55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   kernel/sched/fair.c:902:9: note: in expansion of macro 'if'
     902 |         if (protect_slice(se))
         |         ^~
   kernel/sched/fair.c: In function 'pick_eevdf':
   kernel/sched/fair.c:942:50: error: void value not ignored as it ought to be
     942 |         if (sched_feat(RUN_TO_PARITY) && curr && protect_slice(curr))
         |                                                  ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:57:52: note: in definition of macro '__trace_if_var'
      57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                    ^~~~
   kernel/sched/fair.c:942:9: note: in expansion of macro 'if'
     942 |         if (sched_feat(RUN_TO_PARITY) && curr && protect_slice(curr))
         |         ^~
   kernel/sched/fair.c:942:50: error: void value not ignored as it ought to be
     942 |         if (sched_feat(RUN_TO_PARITY) && curr && protect_slice(curr))
         |                                                  ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:57:61: note: in definition of macro '__trace_if_var'
      57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                             ^~~~
   kernel/sched/fair.c:942:9: note: in expansion of macro 'if'
     942 |         if (sched_feat(RUN_TO_PARITY) && curr && protect_slice(curr))
         |         ^~
   kernel/sched/fair.c:942:50: error: void value not ignored as it ought to be
     942 |         if (sched_feat(RUN_TO_PARITY) && curr && protect_slice(curr))
         |                                                  ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:68:10: note: in definition of macro '__trace_if_value'
      68 |         (cond) ?                                        \
         |          ^~~~
   include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
      55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   kernel/sched/fair.c:942:9: note: in expansion of macro 'if'
     942 |         if (sched_feat(RUN_TO_PARITY) && curr && protect_slice(curr))
         |         ^~


vim +55 include/linux/compiler.h

2bcd521a684cc9 Steven Rostedt 2008-11-21  49  
2bcd521a684cc9 Steven Rostedt 2008-11-21  50  #ifdef CONFIG_PROFILE_ALL_BRANCHES
2bcd521a684cc9 Steven Rostedt 2008-11-21  51  /*
2bcd521a684cc9 Steven Rostedt 2008-11-21  52   * "Define 'is'", Bill Clinton
2bcd521a684cc9 Steven Rostedt 2008-11-21  53   * "Define 'if'", Steven Rostedt
2bcd521a684cc9 Steven Rostedt 2008-11-21  54   */
a15fd609ad53a6 Linus Torvalds 2019-03-20 @55  #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
a15fd609ad53a6 Linus Torvalds 2019-03-20  56  

:::::: The code at line 55 was first introduced by commit
:::::: a15fd609ad53a631a927c6680e8fb606f42a712b tracing: Simplify "if" macro code

:::::: TO: Linus Torvalds <torvalds@linux-foundation.org>
:::::: CC: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- 
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:[~2025-02-13 14:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 14:57 [peterz-queue:sched/core 1/5] include/linux/compiler.h:55:45: error: invalid use of void expression 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.