* [PATCH] rcu: Remove unused variable
@ 2019-05-17 10:41 Philippe Mazenauer
2019-05-17 10:51 ` Lee Jones
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mazenauer @ 2019-05-17 10:41 UTC (permalink / raw)
Cc: lee.jones, Philippe Mazenauer, Paul E. McKenney, Josh Triplett,
Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes,
rcu, linux-kernel
Variable 'rdp' is set but not used in synchronize_rcu_expidited(). The
macro per_cpu_ptr() used to set the value of 'rdp' has no side effect.
../kernel/rcu/tree_exp.h:768:19: warning: variable ‘rdp’ set but not used [-Wunused-but-set-variable]
struct rcu_data *rdp;
^~~
Signed-off-by: Philippe Mazenauer <philippe.mazenauer@outlook.de>
---
kernel/rcu/tree_exp.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index 9c990df880d1..41f56b6065c6 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -765,7 +765,6 @@ static int rcu_print_task_exp_stall(struct rcu_node *rnp)
*/
void synchronize_rcu_expedited(void)
{
- struct rcu_data *rdp;
struct rcu_exp_work rew;
struct rcu_node *rnp;
unsigned long s;
@@ -802,7 +801,6 @@ void synchronize_rcu_expedited(void)
}
/* Wait for expedited grace period to complete. */
- rdp = per_cpu_ptr(&rcu_data, raw_smp_processor_id());
rnp = rcu_get_root();
wait_event(rnp->exp_wq[rcu_seq_ctr(s) & 0x3],
sync_exp_work_done(s));
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rcu: Remove unused variable
2019-05-17 10:41 [PATCH] rcu: Remove unused variable Philippe Mazenauer
@ 2019-05-17 10:51 ` Lee Jones
2019-05-17 11:57 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: Lee Jones @ 2019-05-17 10:51 UTC (permalink / raw)
To: Philippe Mazenauer
Cc: Paul E. McKenney, Josh Triplett, Steven Rostedt,
Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes, rcu,
linux-kernel
On Fri, 17 May 2019, Philippe Mazenauer wrote:
> Variable 'rdp' is set but not used in synchronize_rcu_expidited(). The
> macro per_cpu_ptr() used to set the value of 'rdp' has no side effect.
>
> ../kernel/rcu/tree_exp.h:768:19: warning: variable ‘rdp’ set but not used [-Wunused-but-set-variable]
> struct rcu_data *rdp;
> ^~~
>
> Signed-off-by: Philippe Mazenauer <philippe.mazenauer@outlook.de>
> ---
> kernel/rcu/tree_exp.h | 2 --
> 1 file changed, 2 deletions(-)
Looks reasonable:
Acked-by: Lee Jones <lee.jones@linaro.org>
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rcu: Remove unused variable
2019-05-17 10:51 ` Lee Jones
@ 2019-05-17 11:57 ` Paul E. McKenney
0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2019-05-17 11:57 UTC (permalink / raw)
To: Lee Jones
Cc: Philippe Mazenauer, Josh Triplett, Steven Rostedt,
Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes, rcu,
linux-kernel
On Fri, May 17, 2019 at 11:51:11AM +0100, Lee Jones wrote:
> On Fri, 17 May 2019, Philippe Mazenauer wrote:
>
> > Variable 'rdp' is set but not used in synchronize_rcu_expidited(). The
> > macro per_cpu_ptr() used to set the value of 'rdp' has no side effect.
> >
> > ../kernel/rcu/tree_exp.h:768:19: warning: variable ‘rdp’ set but not used [-Wunused-but-set-variable]
> > struct rcu_data *rdp;
> > ^~~
> >
> > Signed-off-by: Philippe Mazenauer <philippe.mazenauer@outlook.de>
> > ---
> > kernel/rcu/tree_exp.h | 2 --
> > 1 file changed, 2 deletions(-)
>
> Looks reasonable:
>
> Acked-by: Lee Jones <lee.jones@linaro.org>
Good eyes!
However, Jiang Biao beat you to it. Please see commmit a18e1552af94
("rcu: Remove unused rdp local from synchronize_rcu_expedited()") in -rcu:
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git branch
"dev".
Thanx, Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-17 11:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17 10:41 [PATCH] rcu: Remove unused variable Philippe Mazenauer
2019-05-17 10:51 ` Lee Jones
2019-05-17 11:57 ` Paul E. McKenney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.