Skip to content

Commit 30d8aa5

Browse files
committed
rcu-tasks: Fix code-style issues
This commit declares trc_n_readers_need_end and trc_wait static and replaced a "&" with "&&". The "&" happened to work because the values are bool, but accidents waiting to happen and all that... Reported-by: kbuild test robot <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 8344496 commit 30d8aa5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/rcu/tasks.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,8 @@ EXPORT_SYMBOL_GPL(rcu_trace_lock_map);
737737

738738
#ifdef CONFIG_TASKS_TRACE_RCU
739739

740-
atomic_t trc_n_readers_need_end; // Number of waited-for readers.
741-
DECLARE_WAIT_QUEUE_HEAD(trc_wait); // List of holdout tasks.
740+
static atomic_t trc_n_readers_need_end; // Number of waited-for readers.
741+
static DECLARE_WAIT_QUEUE_HEAD(trc_wait); // List of holdout tasks.
742742

743743
// Record outstanding IPIs to each CPU. No point in sending two...
744744
static DEFINE_PER_CPU(bool, trc_ipi_to_cpu);
@@ -845,7 +845,7 @@ static bool trc_inspect_reader(struct task_struct *t, void *arg)
845845
bool ofl = cpu_is_offline(cpu);
846846

847847
if (task_curr(t)) {
848-
WARN_ON_ONCE(ofl & !is_idle_task(t));
848+
WARN_ON_ONCE(ofl && !is_idle_task(t));
849849

850850
// If no chance of heavyweight readers, do it the hard way.
851851
if (!ofl && !IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB))

0 commit comments

Comments
 (0)