Commit 2b4be548 authored by Paul E. McKenney's avatar Paul E. McKenney

rcu-tasks: Fix warning for unused tasks_rcu_exit_srcu

The tasks_rcu_exit_srcu variable is used only by kernels built
with CONFIG_TASKS_RCU=y, but is defined for all kernesl with
CONFIG_TASKS_RCU_GENERIC=y.  Therefore, in kernels built with
CONFIG_TASKS_RCU_GENERIC=y but CONFIG_TASKS_RCU=n, this gives
a "defined but not used" warning.

This commit therefore moves this variable under CONFIG_TASKS_RCU.

Link: https://lore.kernel.org/oe-kbuild-all/202303191536.XzMSyzTl-lkp@intel.com/Reported-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Tested-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent fe15c26e
...@@ -136,8 +136,10 @@ static struct rcu_tasks rt_name = \ ...@@ -136,8 +136,10 @@ static struct rcu_tasks rt_name = \
.kname = #rt_name, \ .kname = #rt_name, \
} }
#ifdef CONFIG_TASKS_RCU
/* Track exiting tasks in order to allow them to be waited for. */ /* Track exiting tasks in order to allow them to be waited for. */
DEFINE_STATIC_SRCU(tasks_rcu_exit_srcu); DEFINE_STATIC_SRCU(tasks_rcu_exit_srcu);
#endif
/* Avoid IPIing CPUs early in the grace period. */ /* Avoid IPIing CPUs early in the grace period. */
#define RCU_TASK_IPI_DELAY (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB) ? HZ / 2 : 0) #define RCU_TASK_IPI_DELAY (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB) ? HZ / 2 : 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment