Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752863AbbBKQJd (ORCPT ); Wed, 11 Feb 2015 11:09:33 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:55199 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752013AbbBKQJb (ORCPT ); Wed, 11 Feb 2015 11:09:31 -0500 Date: Wed, 11 Feb 2015 08:09:24 -0800 From: "Paul E. McKenney" To: Alexander Gordeev Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] rcu: Remove unnecessary condition check in rcu_qsctr_help() Message-ID: <20150211160924.GF4166@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15021116-0025-0000-0000-0000087C8409 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1275 Lines: 40 On Wed, Feb 11, 2015 at 03:42:37PM +0100, Alexander Gordeev wrote: > In cases ->curtail and ->donetail pointers differ ->rcucblist > always points to the beginning of the current list and thus > can not be NULL. Therefore, the check ->rcucblist != NULL is > redundant and could be removed. > > Cc: "Paul E. McKenney" > Signed-off-by: Alexander Gordeev Good point, queued for 3.21. Thanx, Paul > --- > kernel/rcu/tiny.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c > index cc9ceca..d4e7fe5 100644 > --- a/kernel/rcu/tiny.c > +++ b/kernel/rcu/tiny.c > @@ -103,8 +103,7 @@ EXPORT_SYMBOL(__rcu_is_watching); > static int rcu_qsctr_help(struct rcu_ctrlblk *rcp) > { > RCU_TRACE(reset_cpu_stall_ticks(rcp)); > - if (rcp->rcucblist != NULL && > - rcp->donetail != rcp->curtail) { > + if (rcp->donetail != rcp->curtail) { > rcp->donetail = rcp->curtail; > return 1; > } > -- > 1.8.3.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/