Received: by 10.223.148.5 with SMTP id 5csp7459058wrq; Thu, 18 Jan 2018 05:52:02 -0800 (PST) X-Google-Smtp-Source: ACJfBoupLReAvJ9DipclNUl9NvHdZXpFSDXrBvOgqycwjpMKJ4Cv/fPBOmvIghbLDeVQgMjjm8zm X-Received: by 10.99.161.26 with SMTP id b26mr11652321pgf.322.1516283522692; Thu, 18 Jan 2018 05:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516283522; cv=none; d=google.com; s=arc-20160816; b=Tswl+qBtI6gb4Mibx/2nPFvBjLP5BeEqmueeZRDyf/EPMWu/BpKPwa/EUHfUtI+sUx P0/9q4j3RteeTN/KdADvceKYdvkxpW8H1pSfgwCHZxhKqxdG3ZVVgP0OPDPMz18NkEwt hPm6+w9X7NmX/hwbeo5P/Jt2f5fp/GRZwgRBR80jGpVhD2DVvPCvRactyljJN/OO5oZA igP0ec7Oc6k2KwFkfGx7/BCxpvMiKMrGatJvwgD4tcGjKrQgc6/zHnzQFZoUKqYCZKgO coZs565x8L83B3YbALi1faegEwXt0w8YNPK92uHlwP57CCnsRvwCMzqk0TGsSIuwMkqF S2Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=PSibsmS6JOfzHhuZED7FcK6nm3T6cy3Duk6Gs22HSsU=; b=z8i6W5Kh9zJGQ2yQRdMIU1LDFg6nry/m7Kgj6do2xHQg0Pwhu1jiHUf8DzHcJ7vUBW HRvBztXJWoLQSM+BUHIQBO4fCNOOxUXdeLry+pO+SIh6vxrPK93LFOpe35nTjDEGHiz6 JivDLWe6aiiIGBVzFeaYoHpBi3cEaaY6w6MQrhsnsaFLz97/+pN9VRS4pAcQ1h0VbIKu gyJb05qNDu9jqJrzphIdqmrq0RbOOuBa9bAMgBtp0SqchxE0WyTT1r1bTzuchXIJ+C/D UofxNbxxpI4GeKfA55gDk2eI2RHeesCDDbt5lAeA0OOPzDvHuqbz6NnDNQqdtLoM/9/J G/2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=byqGdrF9; 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 p67si6861865pfj.177.2018.01.18.05.51.48; Thu, 18 Jan 2018 05:52:02 -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=@nifty.com header.s=dec2015msa header.b=byqGdrF9; 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 S1756267AbeARNvF (ORCPT + 99 others); Thu, 18 Jan 2018 08:51:05 -0500 Received: from conssluserg-02.nifty.com ([210.131.2.81]:56880 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755690AbeARNvE (ORCPT ); Thu, 18 Jan 2018 08:51:04 -0500 Received: from mail-ua0-f179.google.com (mail-ua0-f179.google.com [209.85.217.179]) (authenticated) by conssluserg-02.nifty.com with ESMTP id w0IDoqGn005014; Thu, 18 Jan 2018 22:50:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com w0IDoqGn005014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516283453; bh=PSibsmS6JOfzHhuZED7FcK6nm3T6cy3Duk6Gs22HSsU=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=byqGdrF9eriTSKWDpdOzrdGdi62HTu6t03mRWyciUDhh4NuJB40sl7A4+TCm/tFWX dOtLldYsu2jyF/NbhtGeN/T7dGPwGMMAnSyyabiY9rs1i3DKpLlZSiNBeI4egcdqsF 1rCYeGwD8pLCB5S5ARtOA0n4qwzQi8K79c/0dHktWUjVm2DbGd3Aqc/CdHptUlXwEu Q3KJzqJb41pVyR2PDH8tT8uAe2iBUunGXjQHoEHJbeBHsMDfdrgvVWoiYhtQm0UVs6 n9UWWyJUkA1/e1aFFAiig3VPVBmNPtrenVz0LN9shPhBZ9PkUg59Je25WbMk87lDNj fo0Hj4wp2b5ag== X-Nifty-SrcIP: [209.85.217.179] Received: by mail-ua0-f179.google.com with SMTP id n2so14749009uak.9; Thu, 18 Jan 2018 05:50:52 -0800 (PST) X-Gm-Message-State: AKwxytcoylCdgYOdSq8v94N0dqrl3BRrwIGPo5OKE2YyjbUQisxMKRpM pZjoV/euYxOxUXlhC8JoHXklo3JP28AbCsOdajM= X-Received: by 10.176.84.219 with SMTP id q27mr4785948uaa.186.1516283451417; Thu, 18 Jan 2018 05:50:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.89.196 with HTTP; Thu, 18 Jan 2018 05:50:11 -0800 (PST) In-Reply-To: <20180114095620.12088-1-ulfalizer@gmail.com> References: <20180114095620.12088-1-ulfalizer@gmail.com> From: Masahiro Yamada Date: Thu, 18 Jan 2018 22:50:11 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kconfig: Document SYMBOL_OPTIONAL logic To: Ulf Magnusson Cc: Linux Kbuild mailing list , Sam Ravnborg , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-01-14 18:56 GMT+09:00 Ulf Magnusson : > Not obvious, especially if you don't already know how choices are > implemented. > > No functional changes. Only comments added. > > Signed-off-by: Ulf Magnusson > --- > scripts/kconfig/menu.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c > index 92d3f06cd8a2..372eb5d9fef3 100644 > --- a/scripts/kconfig/menu.c > +++ b/scripts/kconfig/menu.c > @@ -548,6 +548,15 @@ void menu_finalize(struct menu *parent) > sym->flags |= SYMBOL_WARNED; > } > > + /* > + * For non-optional choices, add a reverse dependency (corresponding to > + * a select) of ' && m'. This prevents the user from > + * setting the choice mode to 'n' when the choice is visible. > + * > + * This would also work for non-choice symbols, but only non-optional > + * choices clear SYMBOL_OPTIONAL as of writing. Choices are implemented > + * as a type of symbol. > + */ > if (sym && !sym_is_optional(sym) && parent->prompt) { > sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, > expr_alloc_and(parent->prompt->visible.expr, > -- Applied to linux-kbuild/kconfig. Thanks! -- Best Regards Masahiro Yamada