From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933409AbcDLOnm (ORCPT ); Tue, 12 Apr 2016 10:43:42 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:39551 "EHLO e33.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933035AbcDLOnl (ORCPT ); Tue, 12 Apr 2016 10:43:41 -0400 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Tue, 12 Apr 2016 07:44:00 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: Remove some superfluous lines Message-ID: <20160412144400.GB3568@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20160310084904.GP6344@twins.programming.kicks-ass.net> <20160310134146.GK3452@linux.vnet.ibm.com> <20160310135500.GQ6356@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160310135500.GQ6356@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16041214-0009-0000-0000-00001DED9215 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 10, 2016 at 02:55:00PM +0100, Peter Zijlstra wrote: > On Thu, Mar 10, 2016 at 05:41:46AM -0800, Paul E. McKenney wrote: > > On Thu, Mar 10, 2016 at 09:49:04AM +0100, Peter Zijlstra wrote: > > > > > > I think you'll find this condition is superfluous, as the whole function > > > is under #ifdef of that same. > > > > > > Signed-off-by: Peter Zijlstra (Intel) > > > > Right you are! It got moved under that #ifdef in the process of merging > > the RCU, hotplug, and swait changes, and I failed to notice. Good catch! > > > > I will apply this to my tree once -rc1 comes out, as it will apply to > > -rcu at that point. > > > > Or maybe we should remove the #ifdef and add IS_ENABLED() to the other > > functions under that #ifdef. Thoughts? > > I'd go with the #ifdef, its the conventional pattern. Longer term, I am moving from #ifdef to IS_ENABLED(), as it makes for easier detection of compiler errors in oddball combinations of Kconfig options. But no point in carrying redundant code in the meantime, so queued for 4.8. Thanx, Paul