Received: by 10.223.164.221 with SMTP id h29csp121643wrb; Wed, 4 Oct 2017 20:16:27 -0700 (PDT) X-Received: by 10.99.122.28 with SMTP id v28mr10177167pgc.394.1507173387207; Wed, 04 Oct 2017 20:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507173387; cv=none; d=google.com; s=arc-20160816; b=gTlmXQJJLy4YPf1lxFKPWOkHLpPEgfFOIe0nN2mK//hJGeRYbiniib3YQwZVSnYfQU ARX0zGYst7R50ADDs/FjZrUILDHSwZ9aGGStlR5Ck/yJsYavFIA4Mi82Ywj1JqADIFPa TVx56PESG66dnqpOmw46bX+yivmk7tPX8HxPP7k/IvzMbDmeOTPlqCcewkcATbO/Lsgk K9LWkQFY3577TnLuLcGLYjRU4NQBhqQzOWv6u3wTY1rCDPH+x5F44NrkU5iaF3dpVtc9 FavFgPiFyQydVXBA9sVHJn59P9qo0V+efymqpNXfhqmJl8DA2psSPds14ctfN1NrJGxW tx4g== 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 :arc-authentication-results; bh=HpaR9dns4jPc2wtuoo199ksNetfXg/ccwGKi5E7hWo8=; b=raJieyugpvc2haMFizHNsKkvXQngUhfELRBv85RytZnI+Mbh4dogXfz7tdPyoC0hBy Tug6GWe3mcOQ2LfcNIZmjL7pZ8Lct36OLIYH04IORBb5S+iWaDAZLQ6ocO0o5YmRqLKK WWQBIgrhtz38/VkkRyUWHp64KQjWcYqMiP6zEzdYecrLOR0F3vfvvHjKMXJXwQYW3tGX ArIQ2r16qkNsFyiBdO5nGC8103/+a2TlZH42qheOe4f2LoIIbceR5HoTePxJA8W+D3vV 3kE2t45IT7WdEzADqCJ5Q5p+sTmxFis3xi1MYU4Ff7YABZw+zqmP4JEUktOpfAP6qMtl ZgaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DhEut3kk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8si1692634plv.168.2017.10.04.20.16.13; Wed, 04 Oct 2017 20:16:27 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=DhEut3kk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbdJEDOo (ORCPT + 99 others); Wed, 4 Oct 2017 23:14:44 -0400 Received: from mail-vk0-f67.google.com ([209.85.213.67]:35041 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbdJEDOn (ORCPT ); Wed, 4 Oct 2017 23:14:43 -0400 Received: by mail-vk0-f67.google.com with SMTP id h191so3955549vke.2; Wed, 04 Oct 2017 20:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HpaR9dns4jPc2wtuoo199ksNetfXg/ccwGKi5E7hWo8=; b=DhEut3kkXPE6O35qIjpsEWAhOEwTaxNSUAq9hOB72lmRXGRbI8Njjlstx8NW0qNEWA EIkp8WDHeZp25mCYSyMdsqI91zIgjh2ko05KizU+Z+j0NBQ98Aqg6LC7Gup+nCR6F9dr IAYuFXpn7QsSMlADpUceHF3FWmLqHscBkVeRhbuFsQF5LtbWPCE8I7KzGKz6t7p9B+Y/ JW7deKJJjN1GwtmVMRsjWHOfjhY7XCLd6aV3zmoKBeucwra1zm5S2UXm90ikKb78+Ox0 SW/Ja6uBBnXpQj7ecTsiTVoEPr/Zl32lT2icXyf0xM73t5uA93FapdiqlsnGnxMB0Hv6 nbrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HpaR9dns4jPc2wtuoo199ksNetfXg/ccwGKi5E7hWo8=; b=IL+lGZmlB9H8fv/Ac7mXFQVrUuulVK9ZXwDN4J1fZ3POZGBeDHuC9PQvmCbtmb4Bmd WkO0hnQhGjFKf2OC4RUwx6rzN4apEUa1I1GfkK59eG5y6eY5fhLXtiEzDbE0KQPbVNdr /6tpmS4jbNmNZpHyJCb9gU+54sEt85XvzJ8JZKaOa8TCx6Uj+HwXM42StS/1JMz9KK6b E933Lt8GEIkSQujenNiG+5PZsjy7FW83tKCLHgfeTSK6OJwGEaxmvgJ6Xi8SiW0OEFEN 7HnA38PRObaKHroMdc/G5VNJn7OZIrhn+3pPrRBn8Gswe2ESHrH2bH1fZ96MbeLC8ORh AqtA== X-Gm-Message-State: AHPjjUiPXIjMt4XSGrFHXNpwwTlb64uF7bDcwKXfYUUVEpidn8/fv32r Z3uz4/Okwa77KkWarKcx85xBChtDzl8wP912HJo= X-Google-Smtp-Source: AOwi7QAYgSQlzrJzIPF4Ln/Bmk5AUEt5E+TeqBtctp4pIsQGJO8QQdiO4rrzQIGFXEnOSWqHxA33dQl4tXKujyZQmNo= X-Received: by 10.31.224.134 with SMTP id x128mr12875677vkg.1.1507173282299; Wed, 04 Oct 2017 20:14:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.68.14 with HTTP; Wed, 4 Oct 2017 20:14:41 -0700 (PDT) In-Reply-To: <1507096094-14953-1-git-send-email-ulfalizer@gmail.com> References: <1507096094-14953-1-git-send-email-ulfalizer@gmail.com> From: Ulf Magnusson Date: Thu, 5 Oct 2017 05:14:41 +0200 Message-ID: Subject: Re: [PATCH] kconfig: Document the 'symbol' struct To: yann.morin.1998@free.fr, linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ulf Magnusson , Masahiro Yamada , Arnaud Lacombe 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 On Wed, Oct 4, 2017 at 7:48 AM, Ulf Magnusson wrote: > Visibility and choices in particular might be a bit tricky to figure > out. > > Also fix existing comment to point out that P_MENU is also used for > menus. > > Signed-off-by: Ulf Magnusson > --- > scripts/kconfig/expr.h | 45 ++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 44 insertions(+), 1 deletion(-) > > diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h > index a73f762..6344067 100644 > --- a/scripts/kconfig/expr.h > +++ b/scripts/kconfig/expr.h > @@ -74,17 +74,60 @@ enum { > S_DEF_COUNT > }; > > +/* > + * Represents a configuration symbol. > + * > + * Choices are represented as a special kind of symbol and have the > + * SYMBOL_CHOICE bit set in 'flags'. > + */ > struct symbol { > + /* The next symbol in the same bucket in the symbol hash table */ > struct symbol *next; > + > + /* The name of the symbol, e.g. "FOO" for 'config FOO' */ > char *name; > + > + /* S_BOOLEAN, S_TRISTATE, ... */ > enum symbol_type type; > + > + /* > + * The calculated value of the symbol. The SYMBOL_VALID bit is set in > + * 'flags' when this is up to date. Note that this value might differ > + * from the user value set in e.g. a .config file, due to visibility. > + */ > struct symbol_value curr; > + > + /* > + * Values for the symbol provided from outside. def[S_DEF_USER] holds > + * the .config value. > + */ > struct symbol_value def[S_DEF_COUNT]; > + > + /* > + * An upper bound on the tristate value the user can set for the symbol > + * if it is a boolean or tristate. Calculated from prompt dependencies, > + * which also inherit dependencies from enclosing menus, choices, and > + * ifs. If 'n', the user value will be ignored. > + * > + * Symbols lacking prompts always have visibility 'n'. > + */ > tristate visible; > + > + /* SYMBOL_* flags */ > int flags; > + > + /* List of properties. See prop_type. */ > struct property *prop; > + > + /* Dependencies from enclosing menus, choices, and ifs */ > struct expr_value dir_dep; > + > + /* Reverse dependencies through being selected by other symbols */ > struct expr_value rev_dep; > + > + /* > + * "Weak" reverse dependencies through being implied by other symbols > + */ > struct expr_value implied; > }; > > @@ -133,7 +176,7 @@ enum prop_type { > P_UNKNOWN, > P_PROMPT, /* prompt "foo prompt" or "BAZ Value" */ > P_COMMENT, /* text associated with a comment */ > - P_MENU, /* prompt associated with a menuconfig option */ > + P_MENU, /* prompt associated with a menu or menuconfig symbol */ > P_DEFAULT, /* default y */ > P_CHOICE, /* choice value */ > P_SELECT, /* select BAR */ > -- > 2.7.4 > Adding some CCs just because I forgot. No panic. Cheers, Ulf From 1580304871236582169@xxx Wed Oct 04 05:49:27 +0000 2017 X-GM-THRID: 1580304871236582169 X-Gmail-Labels: Inbox,Category Forums