Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3596389rdb; Wed, 13 Sep 2023 17:55:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbEbiyBME2fAcfDbAa1/Y6wh4IYXBGzEQIFNtaEwGoIA633ZAa6HT9lpDvSUIC7JH1ior+ X-Received: by 2002:a05:6902:1209:b0:cea:b62d:620f with SMTP id s9-20020a056902120900b00ceab62d620fmr4673516ybu.45.1694652948272; Wed, 13 Sep 2023 17:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694652948; cv=none; d=google.com; s=arc-20160816; b=mKLQwi9FH3o1b8P0Kmgj+V6iZPfn+0SxUJWkvtyKUfwOJ6IOOoi+BlIA87Uwnq1W+Q XMwtOqqQAdSXK7CYwaFhrAoj0eg03mRowdWpNCwirBtC02iq/kIZ5mEFQz8rMmtkFMoU tRoJL3D7NgsbJlnk0tXqeZtDZ9wFaODRsxd8L1jwqh8pjH+ge7G2Cyx19xHDolpnVZUB hqcJf74LFFVqlIsKONMYF1o8gh8p9cruBfZKGn99Ulo5wsWWDdo2l9f1cva7sNFRLn7L xc1uuSaSEQO6QijGGA7dk6x1Kj88NlvaKRzeHJFVr/VXBKVi0JjJMyL17OA46Nc7uDQJ 7j1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=2DCLnmcqbeJcLbHMyYWTOk/2hFdchUOr/bffN5DYUjA=; fh=PiT4h4eV+wfoVMJZ0l5jvDNbMgzCFGl/5Jjr5+kbIBc=; b=B4KpGDmipMTFJMONGTLk6ELMhJznMjOJhrKwa3mNrPI8TJj74QCzF/ICRMEYhi70Le TdCoaVn41fwts9phB90CgkYQbWvx+GtQlzrOsyRrlc8UG788pqBJ538cOQPb5e7AYwI5 WmsdckG0hTF2hR5qIJtxB520BvxlMYCPSgYqUP3uYb/Oad5t44KibYTCfI46PFs2OY4M 4PZtWq+igjEy0e7DhlhncH3hw82WQ7TOyyWz1CxIp+F29Of0QVE9VkHYmuq9mf2deZIi vii1TdBeSmF3Frb/ZE4ggabVOhAC1Pj8dMIefcCIRFxg2wI1V2K5rmpCL3VWhBD+hvPt 4tvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=hFSZISYn; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=W2wz8OaA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u191-20020a6385c8000000b00547a1922957si315367pgd.407.2023.09.13.17.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 17:55:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=hFSZISYn; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=W2wz8OaA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EA92581DFD42; Wed, 13 Sep 2023 14:17:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232846AbjIMVRU (ORCPT + 99 others); Wed, 13 Sep 2023 17:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232821AbjIMVRR (ORCPT ); Wed, 13 Sep 2023 17:17:17 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67BD419A0; Wed, 13 Sep 2023 14:17:12 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1DBB15C00CE; Wed, 13 Sep 2023 17:17:10 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 13 Sep 2023 17:17:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1694639830; x=1694726230; bh=2D CLnmcqbeJcLbHMyYWTOk/2hFdchUOr/bffN5DYUjA=; b=hFSZISYnmgONLjrajz IARN20iioHx4e0z07CKF2J9XCzubhCvQIhC9q/QP6JeC49HsoW97NWA9/sNMiyuz ZlJxIWPRBJJ8vyUYaQgt7uQWUHS4nO/qRgm/jzVkzhQxW+iHj008LAtm28OeOVLM 1puNNss2kerVDrDZM5k/7dlHiAcJ08e7r4eAaRXBjZ7ZCof0yntGR/EZCsq0K9jg yqoZfoXvbB8lopqrIKP+vEsxnHe/48P7rpkjOEX1rXyB8PuAzaTdUJIKZ+xJ69ZX ooWmjJqi2REjFQ1d5A3tw3RNI3Cg/0Yl0dBv+fHaXFVOubObS7ibjMLLSdDQMHyr xT6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1694639830; x=1694726230; bh=2DCLnmcqbeJcL bHMyYWTOk/2hFdchUOr/bffN5DYUjA=; b=W2wz8OaAcdAPUtH2KSq/xOFW1/O6M 919yPmbpK0xaB78Dq6YZzFTNCmLa5APlVvBbJTBQJ26KVkae3Ykv0iDgHnGuR8I/ 6iSBMyKcWkApEY0ZCy5OTzP14tOJgvOGmcuHwpaho2gkO75aMq/aC/LOQG2TXeuD RInlrAexmOtO0s2ZJ7iDT7NqmTtOI6PUXR44t553heP182OqnFGsa8Bw4WUfKz5z 39UT38FGKGY0VeyNwyWfKGHWAXaG1imbaQPJv9jw+I5MLQjPZR27KFFgHn9O735B zBhgYvCkYj8iFL/nHHqCIeh44zfl6qtH0BOWr/rSvkaw3kRFSZlu7KAzg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeikedgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 5B67BB60089; Wed, 13 Sep 2023 17:17:08 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-745-g95dd7bea33-fm-20230905.001-g95dd7bea Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20230913113801.1901152-1-arnd@kernel.org> Date: Wed, 13 Sep 2023 23:16:47 +0200 From: "Arnd Bergmann" To: "Nicolas Schier" Cc: "Arnd Bergmann" , "Masahiro Yamada" , "Jonathan Corbet" , "Sakari Ailus" , "Javier Martinez Canillas" , "Nathan Chancellor" , "Nick Desaulniers" , linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Documentation: kbuild: explain handling optional dependencies Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Sep 2023 14:17:32 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On Wed, Sep 13, 2023, at 22:34, Nicolas Schier wrote: > On Wed, Sep 13, 2023 at 09:55:36PM +0200 Arnd Bergmann wrote: >> config FOO >> - bool "Support for foo hardware" >> + tristate "Support for foo hardware" >> depends on BAR || !BAR > > ah, thanks, tristate kconfig symbols are really more interesting. But I am > still not sure, whether this works as proposed: > > With the 'config FOO' above and > > config BAR > tristate "Support for bar feature" > > kconfig allows me to choose between these: > > BAR=y => FOO={N/m/y} > BAR=m => FOO={N/m} > BAR=n => FOO={N/m/y} > > But with > > config FOO > tristate "Support for foo hardware" > depends on !BAR=m > > I can choose between: > > BAR=y => FOO={N/m/y} > BAR=m => FOO is not selectable > BAR=n => FOO={N/m/y} That is indeed the point: if BAR=m, we want to be able to pick FOO=m here, otherwise it is impossible to enabled everything as modules. Another correct way to express the same thing as the first would be config FOO tristate "Support for foo hardware" depends on !BAR=m || m which I find even more confusing than the 'BAR || !BAR' convention, though we have that in a couple of places. I just found another variant that I had not seen before: > (Re-checked with BAR=IPV6 and FOO=WIREGUARD; CONFIG_WIREGUARD as 'depends on > IPV6 || !IPV6' in its kconfig definition, and both are tristate kconfig > symbols.) > > Thus, it seems to me, that the intuitive way is the way forward (and several > Kconfigs are out-of-date with regard to 'depends on !X=m'. Or do I still miss > your point? I'm not sure what you mean here, but it appears that one of us is missing the point ;-) Arnd