From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753241AbcADV0W (ORCPT ); Mon, 4 Jan 2016 16:26:22 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:58411 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751908AbcADV0U (ORCPT ); Mon, 4 Jan 2016 16:26:20 -0500 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Mon, 4 Jan 2016 13:26:04 -0800 From: "Paul E. McKenney" To: chengang@emindsoft.com.cn Cc: josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org, Chen Gang Subject: Re: [PATCH] kernel: rcu: tree: Remove useless rcu_data_p when !PREEMPT_RCU Message-ID: <20160104212604.GG32217@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <1451137304-23207-1-git-send-email-chengang@emindsoft.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1451137304-23207-1-git-send-email-chengang@emindsoft.com.cn> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16010421-0017-0000-0000-000010D7D71D Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 26, 2015 at 09:41:44PM +0800, chengang@emindsoft.com.cn wrote: > From: Chen Gang > > The related warning from gcc 6.0: > > In file included from kernel/rcu/tree.c:4630:0: > kernel/rcu/tree_plugin.h:810:40: warning: ‘rcu_data_p’ defined but not used [-Wunused-const-variable] > static struct rcu_data __percpu *const rcu_data_p = &rcu_sched_data; > ^~~~~~~~~~ > > Also remove always redundant rcu_data_p in tree.c. > > Signed-off-by: Chen Gang Queued for review and testing, thank you! Thanx, Paul > --- > kernel/rcu/tree.c | 1 - > kernel/rcu/tree_plugin.h | 1 - > 2 files changed, 2 deletions(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index 3a8856f..ed85d66 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -108,7 +108,6 @@ RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched); > RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh); > > static struct rcu_state *const rcu_state_p; > -static struct rcu_data __percpu *const rcu_data_p; > LIST_HEAD(rcu_struct_flavors); > > /* Dump rcu_node combining tree at boot to verify correct setup. */ > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h > index 9467a8b..e6b88ad 100644 > --- a/kernel/rcu/tree_plugin.h > +++ b/kernel/rcu/tree_plugin.h > @@ -807,7 +807,6 @@ void exit_rcu(void) > #else /* #ifdef CONFIG_PREEMPT_RCU */ > > static struct rcu_state *const rcu_state_p = &rcu_sched_state; > -static struct rcu_data __percpu *const rcu_data_p = &rcu_sched_data; > > /* > * Tell them what RCU they are running. > -- > 1.9.3 >