Skip to contentSkip to conversation

rcu: add missing prototype

PATCH In review Eric Engestrom 2 participants 2 messages Sep 20, 2016 – Sep 21, 2016 RCU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu: add missing prototype

make W=1 warns:
kernel/rcu/tree.c:226:15: warning: no previous prototype for ‘rcu_rnp_online_cpus’ [-Wmissing-prototypes]
unsigned long rcu_rnp_online_cpus(struct rcu_node *rnp)

               ^~~~~~~~~~~~~~~~~~~

---

I couldn't figure out how this list is ordered, I'm happy to move this line if you want :)

---
 kernel/rcu/tree.h | 1 +
 1 file changed, 1 insertion(+)
kernel/rcu/tree.h +1 -0
index f714f87..23be3dc 100644
@@ -668,6 +668,7 @@ static void rcu_sysidle_init_percpu_data(struct rcu_dynticks *rdtp);
 static bool rcu_nohz_full_cpu(struct rcu_state *rsp);
 static void rcu_dynticks_task_enter(void);
 static void rcu_dynticks_task_exit(void);
+static unsigned long rcu_rnp_online_cpus(struct rcu_node *rnp);
 
 #endif /* #ifndef RCU_TREE_NONCORE */
 
Signature · 2 lines
Cheers,
  Eric
#1 lore raw
Quoted 6 lines · Eric Engestrom

make W=1 warns:
kernel/rcu/tree.c:226:15: warning: no previous prototype for ‘rcu_rnp_online_cpus’ [-Wmissing-prototypes]
unsigned long rcu_rnp_online_cpus(struct rcu_node *rnp)

               ^~~~~~~~~~~~~~~~~~~

You lost me on this one. It seems to be complaining about the initial definition.

Hmmm... Would making this function static __maybe_unused also resolve this?

Thanx, Paul

Quoted 25 lines

---

I couldn't figure out how this list is ordered, I'm happy to move this line if you want :)

---
 kernel/rcu/tree.h | 1 +
 1 file changed, 1 insertion(+)
kernel/rcu/tree.h +1 -0
index f714f87..23be3dc 100644
@@ -668,6 +668,7 @@ static void rcu_sysidle_init_percpu_data(struct rcu_dynticks *rdtp);
 static bool rcu_nohz_full_cpu(struct rcu_state *rsp);
 static void rcu_dynticks_task_enter(void);
 static void rcu_dynticks_task_exit(void);
+static unsigned long rcu_rnp_online_cpus(struct rcu_node *rnp);
 
 #endif /* #ifndef RCU_TREE_NONCORE */
 
Signature · 2 lines
Cheers,
  Eric