Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933512AbcJTRlS (ORCPT ); Thu, 20 Oct 2016 13:41:18 -0400 Received: from nbfkord-smmo04.seg.att.com ([209.65.160.86]:26530 "EHLO nbfkord-smmo04.seg.att.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753336AbcJTRlO (ORCPT ); Thu, 20 Oct 2016 13:41:14 -0400 X-MXL-Hash: 580901ba354eb459-8b5bb01818956b43029d7aac0ed2a46de27650ac Subject: Re: [PATCH 1/4] kconfig: introduce the "imply" keyword To: Nicolas Pitre References: <1476920573-14384-1-git-send-email-nicolas.pitre@linaro.org> <1476920573-14384-2-git-send-email-nicolas.pitre@linaro.org> <44f95579-6c35-7592-08e3-d8dbb13026b2@solarflare.com> CC: John Stultz , Richard Cochran , Yann E MORIN , "Thomas Gleixner" , Josh Triplett , , , From: Edward Cree Message-ID: Date: Thu, 20 Oct 2016 18:41:02 +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: 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--14.520000-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-AnalysisOut: [v=2.1 cv=YdO7kllf 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=Zke9RZE_VQwCvSWSfywA: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: 2254 Lines: 40 On 20/10/16 18:04, Nicolas Pitre wrote: > On Thu, 20 Oct 2016, Edward Cree wrote: >> 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. > Some people didn't like the fact that you could turn a driver from m to > y and silently lose some features if they were provided by a subsystem > that also used to be m, which arguably is not the same as being > explicitly disabled. With "select" this is not a problem as the target > symbol is also promoted to y in that case, so I wanted to preserve that > property. Right, but that's an argument for pushing the subsystem's default to y, not for preventing changing the subsystem back to m afterwards. >> Then if BAZ-features are only >> desired for driver FOO2, BAz=m makes sense. > In that case it would make more sense to add a config option related to > FOO asking if BAZ features are desired for that driver (there is already > one occurrence of that with PTP). Or you could simply drop the "imply" > statement from the FOO config entry. But the desire is a property of the user, not of the driver. If you're willing to add CONFIG_FOO_BAZ to every combination of (driver, subsystem) then "imply" becomes unnecessary, doesn't it? Conversely, if you *don't* want to have to do that, then "imply" needs to only ever deal in defaults, not in limitations. >> 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. > Right now that's how PTP support is done. Drivers can optimize things > at build time, but most of them simply cope with a NULL return from > ptp_clock_register(). Hence the imply statement becomes a big > configuration hint rather than some hard build dependency. Right, so those drivers can use PTP if they're y and PTP is m, as long as the PTP module is loaded when they probe. But current "imply" semantics won't allow that... I think that Josh's suggestion (have the UI warn you if you set BAZ to m while FOO=y) is the right approach, but I also think it should be done now rather than at some unspecified future time. Otherwise you forbid potentially valid configs. -Ed