Received: by 10.223.185.116 with SMTP id b49csp94198wrg; Thu, 22 Feb 2018 17:21:58 -0800 (PST) X-Google-Smtp-Source: AH8x227zdkUsuK+MBVaRUdYS5KeefM0Rc9ishlCcv8cIe+doDrHa3v+8fA6Uz3S+Ho5DUAzc2N4l X-Received: by 10.98.61.73 with SMTP id k70mr5779532pfa.10.1519348918603; Thu, 22 Feb 2018 17:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519348918; cv=none; d=google.com; s=arc-20160816; b=SBZFVztdFPgG8DEzLjrFMvTfdFaZo11jCFigiNy/WkvrQqJsKKXE8TdicNnf1aT36c iyyhv4dF5jRJk3mxLuMnpxu9X+e3uch6L334iQPCzR4QT5u/LWwv1DOKdfm+geZTNNsX /MSah7o19+FpWzmhTmvCYQtyUaF4ZqZwZVmzHOFDLkDlxeGCyW6G1FyM3G+koYPx+an7 QzTnfhEFht8yx0ELX+ObVpZCVsTpVcKrk9gfgYVItebbcwlePuz8j4FqvKHVjtrzRGay NhbygLOwBZCoWbWqKGnBcfR7IySowkXTrY3JRS2+h3kVE94BUNETBzvFKBfeGiQ+zDxC PGhg== 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=YQYCuYiwMSmz+8lLaDSwdKPbclRSpy1KnNeCe3+Rua0=; b=lP+5ylfCdjT1nUq+7qHdx/EX4cg7QM53QHV56ObkMFOQUzNs5G7Pz0y9kXs1yJDPqC hwvLUAERPW0DPgD5tlF1OaQKCoWdB27pdlZKGEAK9YO5N9blaRMYfgoYstUvD4ajv2Oa 23AEEBYqyj/VKwqUV6gqDcHZbnhyet7lZ135BaWpJ18sTyEHCeP1M5qFkCJpysbaLX/8 Eqbi4AuR2Mbzw9EXQQEGPxIqoM/8Zk4Eqj8OVTGpPPGTxiyn1YzN74YO4yZeoAso+vEo 8jk0ILOhhvkZbo4Mhf7Ikz/HQ1M3SOxBOuJ6Pv6nB5FdQ1UM80XJbtJ9dtxIUN4TzuM3 id+A== 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 j12si764003pgt.173.2018.02.22.17.21.43; Thu, 22 Feb 2018 17:21:58 -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 S1751357AbeBWBUj (ORCPT + 99 others); Thu, 22 Feb 2018 20:20:39 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57360 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbeBWBUi (ORCPT ); Thu, 22 Feb 2018 20:20:38 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1N1IhZP113018 for ; Thu, 22 Feb 2018 20:20:38 -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 2ga8ep1ev6-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Feb 2018 20:20:38 -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 20:20:36 -0500 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) 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 20:20:33 -0500 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1N1KWCY3539410; Fri, 23 Feb 2018 01:20:32 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F01DB2052; Thu, 22 Feb 2018 21:22:50 -0500 (EST) Received: from paulmck-ThinkPad-W541 (unknown [9.85.154.79]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 61B44B204E; Thu, 22 Feb 2018 21:22:50 -0500 (EST) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id C3B7016C86CD; Thu, 22 Feb 2018 17:20:57 -0800 (PST) Date: Thu, 22 Feb 2018 17:20:57 -0800 From: "Paul E. McKenney" To: Zhouyi Zhou 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> <20180222165803.GF2855@linux.vnet.ibm.com> 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-GCONF: 00 x-cbid: 18022301-0024-0000-0000-0000032B5CD7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008579; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.00993683; UDB=6.00504939; IPR=6.00773023; MB=3.00019697; MTD=3.00000008; XFM=3.00000015; UTC=2018-02-23 01:20:35 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022301-0025-0000-0000-0000471E7CA5 Message-Id: <20180223012057.GO2855@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-22_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1802230012 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 23, 2018 at 09:04:05AM +0800, Zhouyi Zhou wrote: > Thanks Paul for reviewing And thank you for your interest in SRCU! I am pretty sure that other bugs still remain. ;-) Thanx, Paul > Cheers > Zhouyi > > On Friday, February 23, 2018, Paul E. McKenney > wrote: > > > 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 > > > > > > >