From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728551AbgDWPF7 (ORCPT ); Thu, 23 Apr 2020 11:05:59 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2516C08ED7D for ; Thu, 23 Apr 2020 08:05:58 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id di6so3009205qvb.10 for ; Thu, 23 Apr 2020 08:05:58 -0700 (PDT) Date: Thu, 23 Apr 2020 12:05:57 -0300 From: Jason Gunthorpe Subject: Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword Message-ID: <20200423150556.GZ26002@ziepe.ca> References: <87v9lu1ra6.fsf@intel.com> <45b9efec57b2e250e8e39b3b203eb8cee10cb6e8.camel@mellanox.com> <62a51b2e5425a3cca4f7a66e2795b957f237b2da.camel@mellanox.com> <871rofdhtg.fsf@intel.com> <940d3add-4d12-56ed-617a-8b3bf8ef3a0f@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Nicolas Pitre Cc: Randy Dunlap , Jani Nikula , Saeed Mahameed , "masahiroy@kernel.org" , "Laurent.pinchart@ideasonboard.com" , "airlied@linux.ie" , "linux-kbuild@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jernej.skrabec@siol.net" , "arnd@arndb.de" , "netdev@vger.kernel.org" , "jonas@kwiboo.se" , "kieran.bingham+renesas@ideasonboard.com" , "narmstrong@baylibre.com" , "leon@kernel.org" On Thu, Apr 23, 2020 at 11:01:40AM -0400, Nicolas Pitre wrote: > On Wed, 22 Apr 2020, Randy Dunlap wrote: > > > On 4/22/20 2:13 PM, Nicolas Pitre wrote: > > > On Wed, 22 Apr 2020, Jani Nikula wrote: > > > > > >> On Tue, 21 Apr 2020, Nicolas Pitre wrote: > > >>> This is really a conditional dependency. That's all this is about. > > >>> So why not simply making it so rather than fooling ourselves? All that > > >>> is required is an extension that would allow: > > >>> > > >>> depends on (expression) if (expression) > > >>> > > >>> This construct should be obvious even without reading the doc, is > > >>> already used extensively for other things already, and is flexible > > >>> enough to cover all sort of cases in addition to this particular one. > > >> > > >> Okay, you convinced me. Now you only need to convince whoever is doing > > >> the actual work of implementing this stuff. ;) > > > > > > What about this: > > > > > > Subject: [PATCH] kconfig: allow for conditional dependencies > > > > > > This might appear to be a strange concept, but sometimes we want > > > a dependency to be conditionally applied. One such case is currently > > > expressed with: > > > > > > depends on FOO || !FOO > > > > > > This pattern is strange enough to give one's pause. Given that it is > > > also frequent, let's make the intent more obvious with some syntaxic > > > sugar by effectively making dependencies optionally conditional. > > > This also makes the kconfig language more uniform. > > > > > > Signed-off-by: Nicolas Pitre > > > > Hi, > > > > If we must do something here, I prefer this one. > > > > Nicolas, would you do another example, specifically for > > CRAMFS_MTD in fs/cramfs/Kconfig, please? > > I don't see how that one can be helped. The MTD dependency is not > optional. Could it be done as config MTD depends on CRAMFS if CRAMFS_MTD ? Jason