lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180222165803.GF2855@linux.vnet.ibm.com>
Date:   Thu, 22 Feb 2018 08:58:03 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     zhouzhouyi@...il.com
Cc:     josh@...htriplett.org, rostedt@...dmis.org,
        mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] srcu: remove never used variable

On Thu, Feb 22, 2018 at 06:52:37AM +0000, zhouzhouyi@...il.com wrote:
> From: Zhouyi Zhou <zhouzhouyi@...il.com>
> 
> In function srcu_gp_end, the variable idxnext is never used after assign,
> remove it and its assign statement.
> 
> Signed-off-by: Zhouyi Zhou <zhouzhouyi@...il.com>

Good catch, but Byungchul Park beat you to it.  Please see commit
a72da917f186 ("srcu: Remove dead code in srcu_gp_end()") in -rcu.

							Thanx, Paul

> ---
>  kernel/rcu/srcutree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
> index d5cea81..1241715 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;
>  	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;
> -- 
> 2.1.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ