Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2148168ybz; Thu, 23 Apr 2020 12:26:52 -0700 (PDT) X-Google-Smtp-Source: APiQypL44xjct+XjtvhWUNtqbxPooz6Ln9kBCKfXki6+8r1hlVRbICuUNWEtRqFcr3ZQmEaDT4tJ X-Received: by 2002:a50:bf4d:: with SMTP id g13mr4028094edk.381.1587670012038; Thu, 23 Apr 2020 12:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587670012; cv=none; d=google.com; s=arc-20160816; b=tJjbtK4QL2UAT7RimcETffiOrMPxNqPThi3w8APXctzoGojeKQOXB8+L/vBd/LxoNN qa/oYD+Q/+5xtuiyPSS/xH17DVSJHvfTE/C/WB9a5DzTv5pFY5zAw+kMUxCx5KLYm+9B Wz4U2O8x0pZ2UJSxGpdB/NwyVPRz2LR2TRwyHt7cbHPC03VElla9q/MhSqB/BinMa5hI 3Dkjb1jlw4Jbj8LENf48hZv1hcDSpsdC9GjNEXbZtKptobcAziIDcXMtNjcisOId/YQu LyI+7bwKqg6lnZkYVdDRP5rxld2SJacR6iBHjV8dYrlP2byuQGcgaAYLzleYgZZwInyw wSjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RuwvuXrV7STsC2XSTWZguPreMY6qFyucfZMv6dyCZ9g=; b=DYoU8EVJh67CNxYGSkMIwD1fG+wN3kawlJLPrbOoecTjX4D8AHTVlLUHCeX5DvNjGo K8FltGQChUrsZSoTq+2RNs10sroqhL8zV8M+3Lw39IXP8vZ1KxyHtroq2/rUrVCdaqO5 KH1vjJwiBTClidw722fp3+mtP4AAQH2G/LCMQNxUr8NF1PKLYdqmrqrE/+TTXIvoI/gq FGUGjsSOBETb8P2qloTlSrobJAsqzzzvZopF8GgynNsit21Kmh800m+uTCYWapAOygTZ a6a//CtBKYmp8diqhLIoBmdOiBZrDrtTO3IBzfmot0s4Hrt1tRPcNWjPO3ca9hnyXLFb pyxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=L1nG+W+9; 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 h4si1940508ejo.186.2020.04.23.12.26.28; Thu, 23 Apr 2020 12:26:52 -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=@ziepe.ca header.s=google header.b=L1nG+W+9; 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 S1728878AbgDWPQ1 (ORCPT + 99 others); Thu, 23 Apr 2020 11:16:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729009AbgDWPQ0 (ORCPT ); Thu, 23 Apr 2020 11:16:26 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66F4BC09B041 for ; Thu, 23 Apr 2020 08:16:26 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id g74so6679949qke.13 for ; Thu, 23 Apr 2020 08:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RuwvuXrV7STsC2XSTWZguPreMY6qFyucfZMv6dyCZ9g=; b=L1nG+W+9ij6Dmdui58Miqo8Hh4qEFLkqwCmLJxQxFoePYWrMwKGNzaxr4E80FZkNCe hQY0MtIjCD3biwbp2usIhc/bG/mliQ/SqZ0McDel88WUP76y2ZGdmL7PMNp0PaHNo0rl MKaRM6WGmnlovhV+jkviMk0Md8xSeIBeyYs3Jhj1MboZsVxSy5Z6KFdWQkuMOmJMkHPs xPJ9WRJzN1iFHYZg9vn/CoYF58u7O3qGIJsDg9NbskJH9YenhnG+h/m1F2YovvkdJuHM TlIy/oK9hmHrgClqupcDFQjiLPAX4CZbEe2orbnKjAJwMTc7eueUgAjkgMriugvWA7bZ 9BvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RuwvuXrV7STsC2XSTWZguPreMY6qFyucfZMv6dyCZ9g=; b=XRgESZ+XcVFqHiAFixJxmmqIINAWOtvC5Z0YXA+NR6CD0aTTeB4Ynp+virTg57pHbA RLL9Rvl/KOEXAE25zP7WfSyc1gNtU1LFHT48pSpZ5tr3IyUVSshg75uOtuOWf31z4HEP NmQGHJnDUEC0CrQIuKAE88ZY8gof04Cf7MzrVl1oNLvlZlOwghND1w3ZmFFw5ajlEx6s mR3Jqdrxfxdl6KHKByiPZmEacLRyTZiIcTexblcdm4s4uRdTx925q8ewOwHYD4GCw68F /h1BRC46jOXNLTGmhSTHr8rlGhhtcmA3JhHNe7s6athggNrXnq809Cw2/FwkJDyhQIfR b6yw== X-Gm-Message-State: AGi0PuZCI1/TbfEqYzIlce03DoSvIO5PfhW+UihA7dczQTqNRxmma8DT 1RwldMxp/N8r8VZWzIjPRtIg1w== X-Received: by 2002:a37:9dd6:: with SMTP id g205mr4268266qke.9.1587654985482; Thu, 23 Apr 2020 08:16:25 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id a22sm1663046qko.81.2020.04.23.08.16.25 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Apr 2020 08:16:25 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jRdaS-0003hD-Gu; Thu, 23 Apr 2020 12:16:24 -0300 Date: Thu, 23 Apr 2020 12:16:24 -0300 From: Jason Gunthorpe 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" Subject: Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword Message-ID: <20200423151624.GA26002@ziepe.ca> References: <45b9efec57b2e250e8e39b3b203eb8cee10cb6e8.camel@mellanox.com> <62a51b2e5425a3cca4f7a66e2795b957f237b2da.camel@mellanox.com> <871rofdhtg.fsf@intel.com> <940d3add-4d12-56ed-617a-8b3bf8ef3a0f@infradead.org> <20200423150556.GZ26002@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? Jason