Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758205AbcJTOwk (ORCPT ); Thu, 20 Oct 2016 10:52:40 -0400 Received: from nbfkord-smmo02.seg.att.com ([209.65.160.78]:31614 "EHLO nbfkord-smmo02.seg.att.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756547AbcJTOwi (ORCPT ); Thu, 20 Oct 2016 10:52:38 -0400 X-MXL-Hash: 5808da363517dc56-8f901d7f5b76e5bcc6f2803a9823af438cb807ab Subject: Re: [PATCH 1/4] kconfig: introduce the "imply" keyword To: Nicolas Pitre , John Stultz , Richard Cochran , "Yann E MORIN" References: <1476920573-14384-1-git-send-email-nicolas.pitre@linaro.org> <1476920573-14384-2-git-send-email-nicolas.pitre@linaro.org> CC: Thomas Gleixner , Josh Triplett , , , From: Edward Cree Message-ID: <44f95579-6c35-7592-08e3-d8dbb13026b2@solarflare.com> Date: Thu, 20 Oct 2016 15:52:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <1476920573-14384-2-git-send-email-nicolas.pitre@linaro.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.17.20.45] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.000.1202-22648.003 X-TM-AS-Result: No--9.362000-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-AnalysisOut: [v=2.1 cv=Af23aijG c=1 sm=1 tr=0 a=8P+NB+fYZDP74ap4g4d9Kw==] X-AnalysisOut: [:17 a=fVG4DLb5TBsA:10 a=IkcTkHD0fZMA:10 a=CH0kA5CcgfcA:10 ] X-AnalysisOut: [a=WFoA46S-BaDhUnX9SL8A:9 a=QEXdDO2ut3YA:10] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [193.34.186.16] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1505 Lines: 40 On 20/10/16 00:42, Nicolas Pitre wrote: > diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt > index 069fcb3eef..c96127f648 100644 > --- a/Documentation/kbuild/kconfig-language.txt > +++ b/Documentation/kbuild/kconfig-language.txt > @@ -113,6 +113,33 @@ applicable everywhere (see syntax). > That will limit the usefulness but on the other hand avoid > the illegal configurations all over. > > +- weak reverse dependencies: "imply" ["if" ] > + This is similar to "select" as it enforces a lower limit on another > + symbol except that the "implied" config symbol's value may still be > + set to n from a direct dependency or with a visible prompt. > + Given the following example: > + > + config FOO > + tristate > + imply BAZ > + > + config BAZ > + tristate > + depends on BAr > + > + The following values are possible: > + > + FOO BAR BAR's default choice for BAZ Should the third column not be "BAZ's default"? > + --------------- --------------- --------------- -------------- > + n y n N/m/y > + m y m M/y/n > + y y y Y/n > + y n * N Also, I don't think having any FOO=y should preclude BAZ=m. Suppose both FOO and FOO2 imply BAZ, FOO=y and FOO2=m. Then if BAZ-features are only desired for driver FOO2, BAz=m makes sense. There is also the case of drivers with the ability to detect at runtime whether BAZ is present, rather than making the decision at build time, but I'm not sure how common that is. -Ed