Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2150905ybz; Thu, 23 Apr 2020 12:29:46 -0700 (PDT) X-Google-Smtp-Source: APiQypL0kpXUw2y1oiJmedQOW+cbopEb89o9XV3R1ddjvSYWjsaSwZtnuHo7bjP/rWC44Tv6nwvt X-Received: by 2002:a50:d90f:: with SMTP id t15mr4096754edj.209.1587670185870; Thu, 23 Apr 2020 12:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587670185; cv=none; d=google.com; s=arc-20160816; b=sfZgkBsC8ccPBtdDggqINH+azEORG9AwzPj7s66W9aVHJnd7z68riugmEU6QQqWJsS 233A352m7FVMooVF7+yTCOdXOukTvv22tP7vbcc0IECpJkukoUUUhqqg30oXwTOb9zr8 KEfdoZmhVEM27pwgEuexmEONJDGyPgR01MHPuxTz7we7aLuL4SjrGJu0b/dpjhV+Yi21 6O/i4ThZ2HeYhHT9RPN45mNXBqMhJwgh6CDXpdHE6tDgC3EgWpXOMsfWA9VMCtx4iFKO hrpHJPWLwtuArkliswaBp0n2M7YWJpntq6qSzT48476g5OPLGWuf85jA3XWxl0F7GIGU 9UoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=ZZwU7HvYFleMWZxXcci/DIA2zGPFFpuJfbU+P1O+R/U=; b=gIQljZyofJCgAZYZgPq59+J463kXRx7BKN/sSaQAFv59/Z9/t8n3qY8BMSZBhEfBP/ LWLNZW7bqSylfVjp17VEwMhQiDg5Udidjz+JW49ioQD94zOgHSLSmjcV0yWPcM0+NO8Y 9Qnu6r1ZDMBdV3EKcSTJta4huHxP5BpeAXbDX7Zm51Vp9j56wcRSaZVaPYwEANyA9GOI 2dVXfieKmP2Eo/nJebMJPdlNDlZRLpM7CcFNWLG9yJ3daECB2nHC79Ymze946xIJVDtP YDire+POz4u8KrkmHErLVf3FGCa9ZvJvsHUesngHThu1ClngKm8is99vk9eL21TC1fcR fDdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=UvBmrFPM; dkim=temperror (no key for signature) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=GP8FmoUA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si1664924edu.7.2020.04.23.12.29.22; Thu, 23 Apr 2020 12:29:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=UvBmrFPM; dkim=temperror (no key for signature) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=GP8FmoUA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729247AbgDWPdm (ORCPT + 99 others); Thu, 23 Apr 2020 11:33:42 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:58339 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729020AbgDWPdm (ORCPT ); Thu, 23 Apr 2020 11:33:42 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 23121C8574; Thu, 23 Apr 2020 11:33:39 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=MzicH27rdexv30KgOupgDHNzO0A=; b=UvBmrF PMNz92Ewh+rcwgIdcQGR4M3AQ2jY6KWfOrfSkXL8JnFRn9Nh4Cro8Qx2aY7YO6tl h9CIZFjTUPH5OuzsSzc1+R3XANRPOa7ByVsaQ6gIWrk7cjddjyU6doaGeycpTs3/ w8tZJWYpDXwuFOVjL32ekNMAenfqIkrgmZLVc= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 05F3EC8573; Thu, 23 Apr 2020 11:33:39 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=O+rr3BNuwQiLVk4n3xxKa9AYdQMYS30XZdh6Q/mV6mA=; b=GP8FmoUAyQxzMBurjGECSXPTktUpNn0yelSY0szzIiWj0WaVqVQq+2mKCHjIUZKST8MdBgH6RFUMdn8mrh6T4v2kfKVQMqN7bu88pAAw4Oq8jbJQ85L0HFohdzuyU7tg02NWSRvJqRPHdW1oXbmfiNH1OppF+RnPP6GsaMUzMNw= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id C5D35C856F; Thu, 23 Apr 2020 11:33:35 -0400 (EDT) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id E37032DA0CB1; Thu, 23 Apr 2020 11:33:33 -0400 (EDT) Date: Thu, 23 Apr 2020 11:33:33 -0400 (EDT) From: Nicolas Pitre To: Jason Gunthorpe 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" Subject: Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword In-Reply-To: <20200423151624.GA26002@ziepe.ca> Message-ID: References: <45b9efec57b2e250e8e39b3b203eb8cee10cb6e8.camel@mellanox.com> <62a51b2e5425a3cca4f7a66e2795b957f237b2da.camel@mellanox.com> <871rofdhtg.fsf@intel.com> <940d3add-4d12-56ed-617a-8b3bf8ef3a0f@infradead.org> <20200423150556.GZ26002@ziepe.ca> <20200423151624.GA26002@ziepe.ca> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Pobox-Relay-ID: CBFEED22-8577-11EA-B0EC-8D86F504CC47-78420484!pb-smtp21.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Apr 2020, Jason Gunthorpe wrote: > On Thu, Apr 23, 2020 at 11:11:46AM -0400, Nicolas Pitre wrote: > > On Thu, 23 Apr 2020, Jason Gunthorpe wrote: > > > > > 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 > > > > > > ? > > > > No. There is no logic in restricting MTD usage based on CRAMFS or > > CRAMFS_MTD. > > Ah, I got it backwards, maybe this: > > config CRAMFS > depends on MTD if CRAMFS_MTD > > ? Still half-backward. CRAMFS should not depend on either MTD nor CRAMFS_MTD. It is CRAMFS_MTD that needs both CRAMFS and MTD. Furthermore CRAMFS_MTD can't be built-in if MTD is modular. Nicolas