kernel/trace/rv/monitors/sleep/sleep.c:219:26: error: static declaration of 'rv_sleep' follows non-static declaration
Subsystems (2)
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace latency/for-next head: 69d8895cb9a9f6450374577af8584c2e21cb5a9f commit: 4f739ed19d222de33b19ca639a34523fbbec20d0 [3/5] rv: Pass va_list to reactors config: arc-randconfig-r071-20251113 (https://download.01.org/0day-ci/archive/20251113/[email protected]/config) compiler: arc-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251113/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> kernel/trace/rv/monitors/sleep/sleep.c:219:26: error: static declaration of 'rv_sleep' follows non-static declaration
static struct rv_monitor rv_sleep = {
^~~~~~~~
In file included from include/linux/cleanup.h:7,
from include/linux/interrupt.h:8,
from include/linux/trace_recursion.h:5,
from include/linux/ftrace.h:10,
from kernel/trace/rv/monitors/sleep/sleep.c:2:
include/rv/ltl_monitor.h:19:37: note: previous declaration of 'rv_sleep' was here
#define RV_MONITOR_NAME CONCATENATE(rv_, MONITOR_NAME)
^~~
include/linux/args.h:25:24: note: in definition of macro '__CONCAT'
#define __CONCAT(a, b) a ## b
^
include/rv/ltl_monitor.h:19:25: note: in expansion of macro 'CONCATENATE'
#define RV_MONITOR_NAME CONCATENATE(rv_, MONITOR_NAME)
^~~~~~~~~~~
include/rv/ltl_monitor.h:24:26: note: in expansion of macro 'RV_MONITOR_NAME'
extern struct rv_monitor RV_MONITOR_NAME;
^~~~~~~~~~~~~~~vim +/rv_sleep +219 kernel/trace/rv/monitors/sleep/sleep.c
f74f8bb246cf22 Nam Cao 2025-07-09 218
f74f8bb246cf22 Nam Cao 2025-07-09 @219 static struct rv_monitor rv_sleep = {
f74f8bb246cf22 Nam Cao 2025-07-09 220 .name = "sleep",
f74f8bb246cf22 Nam Cao 2025-07-09 221 .description = "Monitor that RT tasks do not undesirably sleep",
f74f8bb246cf22 Nam Cao 2025-07-09 222 .enable = enable_sleep,
f74f8bb246cf22 Nam Cao 2025-07-09 223 .disable = disable_sleep,
f74f8bb246cf22 Nam Cao 2025-07-09 224 };f74f8bb246cf22 Nam Cao 2025-07-09 225
:::::: The code at line 219 was first introduced by commit :::::: f74f8bb246cf22f27752977da62079cb615f55b2 rv: Add rtapp_sleep monitor
:::::: TO: Nam Cao <[email protected]> :::::: CC: Steven Rostedt (Google) <[email protected]>
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Gabriele Monaco
maintainerQuoted 21 lines · kernel test robot
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace latency/for-
next
head:69d8895cb9a9f6450374577af8584c2e21cb5a9f
commit:4f739ed19d222de33b19ca639a34523fbbec20d0[3/5] rv: Passva_listto reactors
config: arc-randconfig-r071-20251113
(https://download.01.org/0day-ci/archive/20251113/202511131948.vxi5mdjU-lkp@in
tel.com/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20251113/202511131948.vxi5mdjU-lkp@in
tel.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 tagsQuoted 3 lines
Reported-by kernel test robot <[email protected]>Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 6 lines
All errors (new ones prefixed by >>):
Quoted 2 lines
Quoted 2 lines
kernel/trace/rv/monitors/sleep/sleep.c:219:26: error: static declaration of 'rv_sleep' follows non-static declarationstatic struct
rv_monitorrv_sleep= {
^~~~~~~~
My bad I didn't test with !CONFIG_RV_REACTORS, is there a reason why we'd want this non-static?
#ifdef CONFIG_RV_REACTORS
static struct rv_monitor RV_MONITOR_NAME;
#else
extern struct rv_monitor RV_MONITOR_NAME;
#endif
ltl_monitor is included only by the files defining the rv_MONITOR_NAME, that's definitely static as far as I see it.
I'd go with a Fix like this:
include/rv/ltl_monitor.h +0 -5
@@ -17,12 +17,7 @@#endif #define RV_MONITOR_NAME CONCATENATE(rv_, MONITOR_NAME) - -#ifdef CONFIG_RV_REACTORS static struct rv_monitor RV_MONITOR_NAME ; -#else -extern struct rv_monitor RV_MONITOR_NAME ; -#endif static int ltl_monitor_slot =RV_PER_TASK_MONITOR_INIT ;
Any thought?
Thanks,
Gabriele
Quoted 38 lines
In file included from
include/linux/cleanup.h:7,
frominclude/linux/interrupt.h:8,
frominclude/linux/trace_recursion.h:5,
frominclude/linux/ftrace.h:10,
fromkernel/trace/rv/monitors/sleep/sleep.c:2:
include/rv/ltl_monitor.h:19:37: note: previous declaration of 'rv_sleep' was here
#defineRV_MONITOR_NAMECONCATENATE(rv_, MONITOR_NAME)
^~~include/linux/args.h:25:24: note: in definition of macro '__CONCAT' #define__CONCAT(a, b)a ## b
^
include/rv/ltl_monitor.h:19:25: note: in expansion of macro 'CONCATENATE' #defineRV_MONITOR_NAMECONCATENATE(rv_, MONITOR_NAME)^~~~~~~~~~~include/rv/ltl_monitor.h:24:26: note: in expansion of macro 'RV_MONITOR_NAME'
extern structrv_monitorRV_MONITOR_NAME;
^~~~~~~~~~~~~~~vim +/rv_sleep +219
kernel/trace/rv/monitors/sleep/sleep.c
f74f8bb246cf22Nam Cao 2025-07-09 218f74f8bb246cf22Nam Cao 2025-07-09 @219 static structrv_monitorrv_sleep= {f74f8bb246cf22Nam Cao 2025-07-09 220 .name = "sleep",f74f8bb246cf22Nam Cao 2025-07-09 221 .description = "Monitor that
RT tasks do not undesirably sleep",f74f8bb246cf22Nam Cao 2025-07-09 222 .enable =enable_sleep,f74f8bb246cf22Nam Cao 2025-07-09 223 .disable =disable_sleep,f74f8bb246cf22Nam Cao 2025-07-09 224 };f74f8bb246cf22Nam Cao 2025-07-09 225:::::: The code at line 219 was first introduced by commit ::::::
f74f8bb246cf22f27752977da62079cb615f55b2rv: Addrtapp_sleepmonitor:::::: TO: Nam Cao <[email protected]> :::::: CC: Steven Rostedt (Google) <[email protected]>
Quoted 26 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace latency/for-next head: 69d8895cb9a9f6450374577af8584c2e21cb5a9f commit: 4f739ed19d222de33b19ca639a34523fbbec20d0 [3/5] rv: Pass va_list to reactors config: arc-randconfig-r071-20251113 (https://download.01.org/0day-ci/archive/20251113/[email protected]/config) compiler: arc-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251113/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
kernel/trace/rv/monitors/sleep/sleep.c:219:26: error: static declaration of 'rv_sleep' follows non-static declarationstatic struct rv_monitor rv_sleep = { ^~~~~~~~ In file included from include/linux/cleanup.h:7, from include/linux/interrupt.h:8, from include/linux/trace_recursion.h:5, from include/linux/ftrace.h:10, from kernel/trace/rv/monitors/sleep/sleep.c:2: include/rv/ltl_monitor.h:19:37: note: previous declaration of 'rv_sleep' was here #define RV_MONITOR_NAME CONCATENATE(rv_, MONITOR_NAME) ^~~ include/linux/args.h:25:24: note: in definition of macro '__CONCAT'
Quoted 8 lines
#define __CONCAT(a, b) a ## b
^
include/rv/ltl_monitor.h:19:25: note: in expansion of macro 'CONCATENATE'
#define RV_MONITOR_NAME CONCATENATE(rv_, MONITOR_NAME)
^~~~~~~~~~~
include/rv/ltl_monitor.h:24:26: note: in expansion of macro 'RV_MONITOR_NAME'
extern struct rv_monitor RV_MONITOR_NAME;
^~~~~~~~~~~~~~~That 'extern' declaration if !CONFIG_RV_REACTORS doesn't make sense. The whole conditional should go away and just always declare:
static struct rv_monitor RV_MONITOR_NAME;
Want me to send a new revision or will you fix it up directly?
Thomas
Gabriele Monaco
maintainerQuoted 6 lines · Thomas Weißschuh
That 'extern' declaration if !CONFIG_RV_REACTORS doesn't make sense. The whole conditional should go away and just always declare:
static struct
rv_monitorRV_MONITOR_NAME;Want me to send a new revision or will you fix it up directly?
The commit is already on linux-next, I guess the easiest thing is to send a fix commit on top of that and Steven can decide whether to squash it before sending it to Linus or leave it as it is.
I can handle this.
Thanks,
Gabriele
Gabriele Monaco
maintainerPATCH 1/1 Fix compilation if !CONFIG_RV_REACTORS
The kernel test robot spotted a compilation error if reactors are disabled.
Fix the warning by keeping LTL monitor variable as always static.
---
This patch fixes a patch that was just merged to trace:latency/for-next. It builds locally with both configurations. I started another kernel robot run and, if it passes, I'm going to send a pull request with only this.
include/rv/ltl_monitor.h | 5 ----- 1 file changed, 5 deletions(-)
include/rv/ltl_monitor.h +0 -5
@@ -17,12 +17,7 @@#endif #define RV_MONITOR_NAME CONCATENATE(rv_, MONITOR_NAME) - -#ifdef CONFIG_RV_REACTORS static struct rv_monitor RV_MONITOR_NAME ; -#else -extern struct rv_monitor RV_MONITOR_NAME ; -#endif static int ltl_monitor_slot =RV_PER_TASK_MONITOR_INIT ;
base-commit: 69d8895cb9a9f6450374577af8584c2e21cb5a9f
Signature · 1 line
2.51.1
Steven Rostedt
maintainerQuoted 5 lines · On Thu, 13 Nov 2025 14:17:25 +0100 Gabriele Monaco <[email protected]> wrote:
The commit is already on linux-next, I guess the easiest thing is to send a fix commit on top of that and Steven can decide whether to squash it before sending it to Linus or leave it as it is.
I can handle this.
I like to treat linux-next as final, and seldom rebase unless there's a major bug that needs a revert.
I'll pull in your patch directly.
Thanks,
-- Steve