lkml.org 
[lkml]   [2018]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] srcu: Remove dead code in srcu_gp_end()
On Wed, 14 Feb 2018 18:05:24 +0900
Byungchul Park <byungchul.park@lge.com> wrote:

> Of course, compilers will optimize out a dead code. Anyway, remove
> any dead code for better readibility.
>
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> ---
> kernel/rcu/srcutree.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
> index 44bc0fa..829453b 100644
> --- a/kernel/rcu/srcutree.c
> +++ b/kernel/rcu/srcutree.c
> @@ -531,7 +531,6 @@ static void srcu_gp_end(struct srcu_struct *sp)
> unsigned long flags;
> unsigned long gpseq;
> int idx;
> - int idxnext;

Interesting. According to git history, idxnext was never actually used.

Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> unsigned long mask;
> struct srcu_data *sdp;
> struct srcu_node *snp;
> @@ -555,7 +554,6 @@ static void srcu_gp_end(struct srcu_struct *sp)
>
> /* Initiate callback invocation as needed. */
> idx = rcu_seq_ctr(gpseq) % ARRAY_SIZE(snp->srcu_have_cbs);
> - idxnext = (idx + 1) % ARRAY_SIZE(snp->srcu_have_cbs);
> rcu_for_each_node_breadth_first(sp, snp) {
> spin_lock_irq_rcu_node(snp);
> cbs = false;

\
 
 \ /
  Last update: 2018-02-14 16:01    [W:0.072 / U:1.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site