From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbbEKWki (ORCPT ); Mon, 11 May 2015 18:40:38 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:37252 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752015AbbEKWkf (ORCPT ); Mon, 11 May 2015 18:40:35 -0400 X-Originating-IP: 173.246.103.110 Date: Mon, 11 May 2015 15:40:24 -0700 From: Josh Triplett To: Paul Bolle Cc: Ingo Molnar , Andrew Morton , "Paul E. McKenney" , Michal Hocko , Vladimir Davydov , Johannes Weiner , Geert Uytterhoeven , Andy Lutomirski , Bertrand Jacquin , "Luis R. Rodriguez" , Iulia Manda , Pranith Kumar , Clark Williams , Mel Gorman , Randy Dunlap , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/1] init/Kconfig: Split expert menu into a separate file, init/Kconfig.expert Message-ID: <20150511224024.GA16022@jtriplet-mobl1> References: <20150511181327.GA1884@jtriplet-mobl1> <20150511202301.GA11897@jtriplet-mobl1> <1431378082.2398.97.camel@x220> <20150511211825.GA12080@jtriplet-mobl1> <1431379948.2398.102.camel@x220> <20150511214710.GA15791@jtriplet-mobl1> <1431381687.2398.119.camel@x220> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431381687.2398.119.camel@x220> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2015 at 12:01:27AM +0200, Paul Bolle wrote: > On Mon, 2015-05-11 at 14:47 -0700, Josh Triplett wrote: > > On Mon, May 11, 2015 at 11:32:28PM +0200, Paul Bolle wrote: > > > Is squashing those two lines worth a new kconfig mechanism? > > > > In my opinion, yes. If you use the implicit (and error-prone) > > menuconfig submenuing, you get a single entry with the '[ ]' and the > > submenu. There are currently 272 instances of "menuconfig" in Kconfig > > files. > > How many of those use the subtle trick EXPERT uses? A rough search suggests about 35, with the rest using an "if" right after the menu (presumably because they want dependencies rather than visibility). (A couple of which currently have the same broken-menu problem today's patch 1 fixed for EXPERT, and a couple of which are using that trick *across input files*.) > > I'd like to have a less error-prone mechanism for people to use, > > with an explicit "endmenu" at the end, and I don't want to leave any > > incentive for people to need the more error-prone version. > > > > I would be tempted to just make "menuconfig" require an endmenu, and > > convert all users, but that would almost certainly break many > > third-party users of kconfig. So instead, I'm currently extending > > "menu" (which already expects "endmenu") to allow the syntax > > "menu config SYMBOL", which acts like a combination of "config SYMBOL" > > and a menu with "visible if SYMBOL". > > Bikeshedding (before I'm even convinced of the need of this extension): > "menu config" is far too similar to "menuconfig". Yeah, agreed; given that people will still end up using "menuconfig" in light of the above, I'll use another syntax. > > Diffstat for the patch I'm testing > > right now: > > > > scripts/kconfig/zconf.y | 18 ++++++++++++++++++ > > 1 file changed, 18 insertions(+) > > > > That seems worthwhile to have a less error-prone menu mechanism. > > > > (The actual patch would also need to updated zconf.tab.c_shipped.) > > And some lines in Documentation/kbuild/kconfig-language.txt (speaking > from memory). Good point; this does need documentation. - Josh Triplett