[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170419171459.3250665-1-arnd@arndb.de>
Date: Wed, 19 Apr 2017 19:14:34 +0200
From: Arnd Bergmann <arnd@...db.de>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Josh Triplett <josh@...htriplett.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
Ingo Molnar <mingo@...nel.org>,
Boqun Feng <boqun.feng@...il.com>,
SeongJae Park <sj38.park@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] rcuperf: fix duplicate struct initializer
Building with "make W=1" shows a set of new warnings in the rcuperf code:
kernel/rcu/rcuperf.c:282:11: error: initialized field overwritten [-Werror=override-init]
.async = srcu_call_rcu,
kernel/rcu/rcuperf.c:282:11: note: (near initialization for 'sched_ops.async')
kernel/rcu/rcuperf.c:283:16: error: initialized field overwritten [-Werror=override-init]
.gp_barrier = srcu_rcu_barrier,
kernel/rcu/rcuperf.c:283:16: note: (near initialization for 'sched_ops.gp_barrier')
kernel/rcu/rcuperf.c:313:11: error: initialized field overwritten [-Werror=override-init]
.async = call_rcu_tasks,
kernel/rcu/rcuperf.c:313:11: note: (near initialization for 'tasks_ops.async')
kernel/rcu/rcuperf.c:314:16: error: initialized field overwritten [-Werror=override-init]
.gp_barrier = rcu_barrier_tasks,
kernel/rcu/rcuperf.c:314:16: note: (near initialization for 'tasks_ops.gp_barrier')
This appears to be a copy-paste bug, so we can remove the extranous copy.
Fixes: f743d20f2cc6 ("rcuperf: Add ability to performance-test call_rcu() and friends")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
kernel/rcu/rcuperf.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
index 329010a41f30..e1ce97bead94 100644
--- a/kernel/rcu/rcuperf.c
+++ b/kernel/rcu/rcuperf.c
@@ -279,8 +279,6 @@ static struct rcu_perf_ops sched_ops = {
.exp_completed = rcu_exp_batches_completed_sched,
.async = call_rcu_sched,
.gp_barrier = rcu_barrier_sched,
- .async = srcu_call_rcu,
- .gp_barrier = srcu_rcu_barrier,
.sync = synchronize_sched,
.exp_sync = synchronize_sched_expedited,
.name = "sched"
@@ -310,8 +308,6 @@ static struct rcu_perf_ops tasks_ops = {
.completed = rcu_no_completed,
.async = call_rcu_tasks,
.gp_barrier = rcu_barrier_tasks,
- .async = call_rcu_tasks,
- .gp_barrier = rcu_barrier_tasks,
.sync = synchronize_rcu_tasks,
.exp_sync = synchronize_rcu_tasks,
.name = "tasks"
--
2.9.0
Powered by blists - more mailing lists