From: kernel test robot <lkp@intel.com>
To: zihan zhou <15645113830zzh@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev,
Peter Zijlstra <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: [peterz-queue:sched/core 1/5] include/linux/compiler.h:55:45: error: invalid use of void expression
Date: Thu, 13 Feb 2025 22:57:46 +0800 [thread overview]
Message-ID: <202502132216.LCb0y45e-lkp@intel.com> (raw)
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
reply other threads:[~2025-02-13 14:58 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=202502132216.LCb0y45e-lkp@intel.com \
--to=lkp@intel.com \
--cc=15645113830zzh@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.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.