Skip to contentSkip to conversation

rcu-tasks: Add missing inline to show_rcu_tasks_rude_gp_kthread() dummy

PATCH In review Geert Uytterhoeven 2 participants 2 messages Oct 16, 2020 – Oct 17, 2020 RCU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu-tasks: Add missing inline to show_rcu_tasks_rude_gp_kthread() dummy

If CONFIG_TINY_RCU=y:

In file included from kernel/rcu/update.c:591:
kernel/rcu/tasks.h:710:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]
static void show_rcu_tasks_rude_gp_kthread(void) {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by marking show_rcu_tasks_rude_gp_kthread() inline.

Fixes e21408ceec2de5be ("rcu-tasks: Add RCU tasks to rcutorture writer stall output")

---
Exposed by commit 1e6c62a882155772 ("bpf: Introduce sleepable BPF programs"), which selects TASKS_TRACE_RCU.

---
 kernel/rcu/tasks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcu/tasks.h +1 -1
index d5d9f2d03e8a0ac9..8c290cc45e6fc63a 100644
@@ -707,7 +707,7 @@ static void show_rcu_tasks_rude_gp_kthread(void)
 #endif /* #ifndef CONFIG_TINY_RCU */
 
 #else /* #ifdef CONFIG_TASKS_RUDE_RCU */
-static void show_rcu_tasks_rude_gp_kthread(void) {}
+static inline void show_rcu_tasks_rude_gp_kthread(void) {}
 #endif /* #else #ifdef CONFIG_TASKS_RUDE_RCU */
 
 ////////////////////////////////////////////////////////////////////////
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 11 lines · Geert Uytterhoeven

If CONFIG_TINY_RCU=y:

In file included from kernel/rcu/update.c:591:
kernel/rcu/tasks.h:710:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]
static void show_rcu_tasks_rude_gp_kthread(void) {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by marking show_rcu_tasks_rude_gp_kthread() inline.

Fixes e21408ceec2de5be ("rcu-tasks: Add RCU tasks to rcutorture writer stall output")

Good catch, but commit 2cf0c4b5 ("rcutorture: Make grace-period kthread report match RCU flavor being tested") beat you to it, though apparently by accident.

Either way, thank you for your time and attention!

Thanx, Paul

Quoted 23 lines

---
Exposed by commit 1e6c62a882155772 ("bpf: Introduce sleepable BPF programs"), which selects TASKS_TRACE_RCU.

---
 kernel/rcu/tasks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcu/tasks.h +1 -1
index d5d9f2d03e8a0ac9..8c290cc45e6fc63a 100644
@@ -707,7 +707,7 @@ static void show_rcu_tasks_rude_gp_kthread(void)
 #endif /* #ifndef CONFIG_TINY_RCU */
 
 #else /* #ifdef CONFIG_TASKS_RUDE_RCU */
-static void show_rcu_tasks_rude_gp_kthread(void) {}
+static inline void show_rcu_tasks_rude_gp_kthread(void) {}
 #endif /* #else #ifdef CONFIG_TASKS_RUDE_RCU */
 
 ////////////////////////////////////////////////////////////////////////
Signature · 1 line
2.17.1