From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932108AbbEKVBa (ORCPT ); Mon, 11 May 2015 17:01:30 -0400 Received: from lb2-smtp-cloud3.xs4all.net ([194.109.24.26]:50734 "EHLO lb2-smtp-cloud3.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265AbbEKVB3 (ORCPT ); Mon, 11 May 2015 17:01:29 -0400 Message-ID: <1431378082.2398.97.camel@x220> Subject: Re: [PATCH 2/1] init/Kconfig: Split expert menu into a separate file, init/Kconfig.expert From: Paul Bolle To: Josh Triplett 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 Date: Mon, 11 May 2015 23:01:22 +0200 In-Reply-To: <20150511202301.GA11897@jtriplet-mobl1> References: <20150511181327.GA1884@jtriplet-mobl1> <20150511202301.GA11897@jtriplet-mobl1> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2015-05-11 at 13:23 -0700, Josh Triplett wrote: > I'd also like to factor the "if EXPERT" off of all the prompts and into a > single scoped item wrapped around all of them, but kconfig doesn't have any way > to do that. "menuconfig" is just a hint, with no matching "endmenu" and no > implicit visibility; "menu" is scoped and has "visible if", but that would > create a separate option containing a menu, rather than a menu under EXPERT's > "Configure standard kernel features (expert users)". And "if EXPERT ... endif" > produces a dependency, not a prompt-visibility condition. So I think this > would require changes to the Kconfig language, to introduce either a scoped > "visible if EXPERT ... endvisible" or similar, or a scoped version of > menuconfig with a matching "endmenu" and implicit visibility (effectively a > "menu" statement with attached "config" rather than a "config" with a hint > "this might be a menu"). I'm leaning towards the latter. The behavior of menuconfig in this case is rather subtle. I must admit I never noticed it. The "visible" option to menus is little used, and I'm not really familiar with it. So, for what it's worth: would adding a new menu with visible if EXPERT attached to it, and putting all current prompt "Foo" if EXPERT entries in that menu roughly do what you want? > So I'll send a followup patch enhancing kconfig to improve this case, > but I think splitting this into a separate file is still worth it even > without that. Thanks, Paul Bolle