Received: by 10.223.185.116 with SMTP id b49csp2154896wrg; Thu, 22 Feb 2018 08:58:44 -0800 (PST) X-Google-Smtp-Source: AH8x226VflUGagv0lmq7gnq7iLliQ3ivGjK7l+uFOk+DUWf0qEZOE24f/ms7zuXw3tl+fjhRXyaT X-Received: by 2002:a17:902:7006:: with SMTP id y6-v6mr7157876plk.37.1519318724853; Thu, 22 Feb 2018 08:58:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519318724; cv=none; d=google.com; s=arc-20160816; b=jaQLoVJ4RdcXuw6mJsVOvDzuTiXnRDlnCUgnKwRdtTsdJRg3c5aArtwXcHOvlW/npq q4dVLaa4QZ5GfGxhVGfsPxvojFHJHnY7ZNwBsLVDF3gmeFSx1kqNNrhTlkMbC57A8+ck nbKTOHEKxhoT4sNyORwcqxLrxp1lRmuyn9koWkPwfdU+a4OMEdRHf5yWVrl3tIXTMt27 jj7ioUxhp+44ffTOxf2afuWrbFXE/E9kew0Z1nzmqPmPz3rYK9ue/KKuAj5RSUeHV/Kw PyQRbE/RmDq7PwRhrPtSO3PntFtblyZ2nvgburjZDUFLOW+AdMygf2QjJFporT1w0rGr JluA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=54+Q4n+2TcQO1ehbIhLUE/RwlRDgfOAlljZD/X5WPBM=; b=rCFc6Sh1Vwrn/vjXLVNmoijiTEg99muyctRBa+uON19WtpmTfIdCAvPp8tcZPdH0lX 4T181blxa7VGsy/oEQ3cr0fklNc3Co0ZQVhXkyqOp5/mv/N5qsIgzavQX0izAmcwchnn crk81WPrdx6dvV4jrqi1jaafdfpLryFAn/LlVEu3v1bMD+N+cI3FKSuJCkJui58vYsck zG9QEz4LSjaWspyUhDzifh7B7D3vjN5B8mELo1JMRl6aEMKOCI33k9edWCNdMAs+zvKi DEsaQSkyo0aXjVKaIoiu5acEnemcNfh1O1NPQPwmLLMQSHaQplgMIUfrHlKOm2PLfy5G /dhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h34-v6si280496pld.761.2018.02.22.08.58.29; Thu, 22 Feb 2018 08:58:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933301AbeBVQ5p (ORCPT + 99 others); Thu, 22 Feb 2018 11:57:45 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42552 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933093AbeBVQ5o (ORCPT ); Thu, 22 Feb 2018 11:57:44 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1MGs65v109704 for ; Thu, 22 Feb 2018 11:57:44 -0500 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2g9x78trm7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Feb 2018 11:57:43 -0500 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Feb 2018 11:57:42 -0500 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 22 Feb 2018 11:57:38 -0500 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1MGvcsL53543058; Thu, 22 Feb 2018 16:57:38 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4C276B2052; Thu, 22 Feb 2018 12:59:56 -0500 (EST) Received: from paulmck-ThinkPad-W541 (unknown [9.85.154.79]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 0EF88B205E; Thu, 22 Feb 2018 12:59:56 -0500 (EST) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 0D6FE16C86CD; Thu, 22 Feb 2018 08:58:03 -0800 (PST) Date: Thu, 22 Feb 2018 08:58:03 -0800 From: "Paul E. McKenney" To: zhouzhouyi@gmail.com Cc: josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] srcu: remove never used variable Reply-To: paulmck@linux.vnet.ibm.com References: <1519282357-17983-1-git-send-email-zhouzhouyi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1519282357-17983-1-git-send-email-zhouzhouyi@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18022216-0024-0000-0000-0000032B19A6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008577; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.00993515; UDB=6.00504840; IPR=6.00772856; MB=3.00019692; MTD=3.00000008; XFM=3.00000015; UTC=2018-02-22 16:57:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022216-0025-0000-0000-0000471D7007 Message-Id: <20180222165803.GF2855@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-22_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802220213 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 22, 2018 at 06:52:37AM +0000, zhouzhouyi@gmail.com wrote: > From: Zhouyi Zhou > > In function srcu_gp_end, the variable idxnext is never used after assign, > remove it and its assign statement. > > Signed-off-by: Zhouyi Zhou 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 >