Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp851065ybv; Thu, 20 Feb 2020 08:23:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzvwROMThIAJTpZtaddjHMMXXrnxGub1fHPUl3ZAy9i/LrZosh+2DKAICttvROcBmw65LBE X-Received: by 2002:a9d:10d:: with SMTP id 13mr12154057otu.238.1582215803021; Thu, 20 Feb 2020 08:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582215803; cv=none; d=google.com; s=arc-20160816; b=S8XO4qpuvJdeiu6ppD1C2trAlKG7On5NV4MaemHhMNGUzlW6SuVtiBcaEFCNTqS/xC A9nuSUm+dbiKx9Asw/QMtIX4NoHuuy0O6Rggvj9f7XiOlTIDILO6Jw3E3NInUGxC7LA1 Mp6hYYe+l7mJQuDgWGYDfoQ4yWOkyL2E0MzE9cV95H8U6tccvwfYyWR9stu4kLe3dhX0 bPZ9cn9K1T220B2NF9bha6hTJhiN+RhXicJh65s/DtgAoVMMzn6uXoEhxlsxnpm3qj3m q+IuNGNjZav8g1TQLGSKy53NhVUbA2cgyHS405tXjyHkXlZQAqggLmJ2d08JViXrHEkP OaIQ== 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=rnfW4gvo8EggmsmxSrLjWGgxbEutT0WpuiYJ7XLIO2M=; b=hfXCIag/pR/FTrgHQnYnod9dTonZCtQZRmc9/QRAuzOD4G8tdUTlmfPVqMx7vcja7k oO0b2Nx3zmo33/W72TFmvvajKn40UbA+XNNMMARh9zYJKA8t07etfzUPfZMTAwiSvibL v1DJFPs70Wnf2QdbUE+RI3su0hHqkzZXqYOctoKY5O4wroDP5KcWm5f77eEXz+X8Sczl 8kKgviwRYg0E3J3P9f42CKL16bBP6W2ALM/SvXS2TbJeb6qAkhy4PjKpZ6/0S8Tn3izI zlDh5fSHKwFoIhht0VMzPy2NEYuKJhSZnHVjQD1FHU+/1sJqLp6ACPV7v/HD07SzcEdq /jgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=yMJErfH7; dkim=temperror (no key for signature) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=R3wf0Jbw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n24si1894017otf.58.2020.02.20.08.23.02; Thu, 20 Feb 2020 08:23:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=yMJErfH7; dkim=temperror (no key for signature) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=R3wf0Jbw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728474AbgBTQVn (ORCPT + 99 others); Thu, 20 Feb 2020 11:21:43 -0500 Received: from pb-smtp1.pobox.com ([64.147.108.70]:63092 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728090AbgBTQVm (ORCPT ); Thu, 20 Feb 2020 11:21:42 -0500 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id E65C64F1EF; Thu, 20 Feb 2020 11:21:39 -0500 (EST) (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=tEarpC/Bn383C0Nl/hZcNVP7D7g=; b=yMJErf H7MQGMLt+NbBtOhx65j3BmpFHaaIqkAfTZnbjfxXXg1GSKGd+VveVdSlhpZElx31 Nd+zRVAtSTB4MOS9PqkQeC7rlRnuVo2qf5RJGLNRFy99dJ3hfgBLu++/wKINSjJu J2jvLiCpY59f7MF5B6Kswlcv78fMMnnFnFkhE= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id D8BF54F1EE; Thu, 20 Feb 2020 11:21:39 -0500 (EST) (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=wqttWhXrTH73nFlmloyzuYlfEV4LPzzHbRl0rCtH0Nw=; b=R3wf0Jbw3PeOzAbxjOBsAY+QXlohs5NoY2O/WkH9pTiiXaA0xZ8L5KfGIj13kTF+hz1CaOmFMSXkK4nlkSINzwd5s9gkAupKv2+Wd0P1qLaIP5Py0uCRUAWj6JwUw82cj2b+eoJpmMiWKy7/yFL5NUuuL1NinxfMfc1wVC7Imlk= 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-smtp1.pobox.com (Postfix) with ESMTPSA id 0D12C4F1ED; Thu, 20 Feb 2020 11:21:39 -0500 (EST) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 0B3BB2DA01AD; Thu, 20 Feb 2020 11:21:38 -0500 (EST) Date: Thu, 20 Feb 2020 11:21:37 -0500 (EST) From: Nicolas Pitre To: Masahiro Yamada cc: Linux Kbuild mailing list , Arnd Bergmann , Richard Cochran , Thomas Gleixner , John Stultz , Josh Triplett , Mark Brown , Ulf Magnusson , Geert Uytterhoeven , Jonathan Corbet , Michal Marek , "open list:DOCUMENTATION" , Linux Kernel Mailing List Subject: Re: [PATCH] kconfig: make 'imply' obey the direct dependency In-Reply-To: Message-ID: References: <20200219074950.23344-1-masahiroy@kernel.org> 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: 12855D8C-53FD-11EA-A719-C28CBED8090B-78420484!pb-smtp1.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Feb 2020, Masahiro Yamada wrote: > Hi Nicolas, > > On Thu, Feb 20, 2020 at 1:16 AM Nicolas Pitre wrote: > > > > On Wed, 19 Feb 2020, Masahiro Yamada wrote: > > > > > As for the combination of FOO=y and BAR=m, the case of BAZ=m is excluded > > > by the 'imply', and BAZ=y is also excluded by 'depends on'. So, only the > > > possible value is BAZ=n. > > > > I don't think this is right. The imply keyword provide influence over > > another symbol but it should not impose any restrictions. If BAR=m then > > BAZ should still be allowed to be m or n. > > > > > @@ -174,6 +174,9 @@ applicable everywhere (see syntax). > > > n y n N/m/y > > > m y m M/y/n > > > y y y Y/n > > > + n m n N/m > > > + m m m M/n > > > + y m n N > > > > Here the last line shoule be y m n N/m. > > > > Generally speaking, the code enabled by FOO may rely on functionalities > > provided by BAZ only when BAZ >= FOO. This is accomplished with > > IS_REACHABLE(): > > > > foo_init() > > { > > if (IS_REACHABLE(CONFIG_BAZ)) > > baz_register(&foo); > > ... > > } > > > > So if FOO=y and BAZ=m then IS_REACHABLE(CONFIG_BAZ) will be false. Maybe > > adding a note to that effect linked to the "y m n N/m" line in the table > > would be a good idea. > > > > I also thought so. > > I agree IS_REACHABLE() is much saner approach. > > So, do you agree to change the current behavior > as follows? > > > index d0111dd26410..47dbfd1ee003 100644 > --- a/Documentation/kbuild/kconfig-language.rst > +++ b/Documentation/kbuild/kconfig-language.rst > @@ -173,7 +173,7 @@ applicable everywhere (see syntax). > === === ============= ============== > n y n N/m/y > m y m M/y/n > - y y y Y/n > + y y y Y/m/n > y n * N > === === ============= ============== > Yes. That should have been the case all along. Nicolas