Received: by 10.223.164.221 with SMTP id h29csp3317585wrb; Tue, 3 Oct 2017 22:49:28 -0700 (PDT) X-Received: by 10.98.252.17 with SMTP id e17mr3557242pfh.48.1507096167949; Tue, 03 Oct 2017 22:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507096167; cv=none; d=google.com; s=arc-20160816; b=hgvKSg5cNibbe430FzoGNfm699lsV52mmTvT2ShsOC3NbeBtakeiaP/HzCK7a7+tNz havugboOJj0Bzfd1wMyajF3SdwwGXyWRUaV5/xoFgZN+HOompyXMLZ8eZkzswpWpFAJo sLx7oE3bxh1lfPOSO92vedA10CLP4TZG33uXovX/+LgXM9lOXlLdTz8TTAiq9/t3hSK4 FSmxwzhfgR9JkhE8UUelRuvFKRZ8yA8Q7ifVuE0mBULPsGdszUHyK7VrM2gjj/VnZHb6 KfQnU470ZtiHDvpcbxz16TO365of4QOROtWuIjzkR3xgUkPmiNUtkF0DwVCtSAp5T67i XDkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=+LUL7WUldZxJqBbjfZsENekHuHMdQ3DeXaon1+I557k=; b=u0kScq6kbkVB91PK6ACmJSt+owdh4pE6bLY43w2qzfajuE4oqi/sOUMkL1ZnWxN2+N wOE5tRQSo/wHmZcyir5GZJuK+PVPHlperZBQRw9IKNtKJVsVj0Icx2PinIqmNGirStMN S6n+Hr5SKrg9Vb9CgztVSZr4FKa+WpGozYlMELgDlZaBZQ9fS4y670TQ1Uiq9lGGk2Ec hqgGUHMV+Xl/hzB4P+qeWYpPZQ2RfpWqx9dfSHwBtnGs0I2zMKC+2XF+01TLQP/OXw/8 b39/iC9lxPBYXTBa0FD6PSXfbu0JcOq7Ebhjlw3g1E/L1mjsClyEgdvWnceUQlvcFsy+ mYBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YHI8lMsx; 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 m14si622844pfh.564.2017.10.03.22.49.04; Tue, 03 Oct 2017 22:49: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=YHI8lMsx; 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 S1751268AbdJDFse (ORCPT + 99 others); Wed, 4 Oct 2017 01:48:34 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:51782 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbdJDFsc (ORCPT ); Wed, 4 Oct 2017 01:48:32 -0400 Received: by mail-lf0-f66.google.com with SMTP id m142so8303160lfg.8; Tue, 03 Oct 2017 22:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=+LUL7WUldZxJqBbjfZsENekHuHMdQ3DeXaon1+I557k=; b=YHI8lMsxEsf92nn/IBtg0gQqzK/+9CFgbf45Tfr9LhOJzGKqRI5VeTk39rTks83Urv ITU6ZMuQ+eV/qyOTAOhtn7+N5rXTHewzp1n9fzJn5FbrvwOa1iiirPH6TDTFJ3melLVY TPDzeJpgpyLYj+JXTdzQZ4pWSZ3SFi+tZeAyWY/W/R73J2kPcrJAOw9P/3z+pSFAEDA9 /U+wIn9GtMuuzecPwSl+XMshJIgZGLuRmMGU2iF5nG3UNgxYlWAVs8D6CuSxXaWDWFpo RdrkLlYkdZRZ1ucayT016pYQ62DWqRejQuwlaM8TA8+O5WLGwB8zq/sxog7B9qV2P48c ezFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+LUL7WUldZxJqBbjfZsENekHuHMdQ3DeXaon1+I557k=; b=tuqjj+nHfx5pMrGjq1gfWixZ3T7MJZjF0RxBPpnBzWify4f6ELpTSSta3cAtU85d3m XLRGzl8dvoD5xGFTXPVzxfvPPBCvd7bpp6zPksiZ3rhvNr5jvzPqc4TSTxXNrKqXYWRc PHGDImVYScYvQkoyEeOOihXyBp/bmlUIZNH1KrCaTN/3/25kquPJfY/Y69/77TiW56Hn 87crzjR0pL/DPyw+sK7GSoTTqZCze48JorY//ZgWBXc0JAnqgQYKUUFFDKo09hv9u/eV a1u5R7NiTvJKWD5J+VnPJTJa2fxLRBu0NH/cgHxahDNiAQ34Pd110gaECgMMihCtmRxr rhkw== X-Gm-Message-State: AHPjjUgO7v0n/HTu5Opj6sAwa0q3SorvR11DCOQUUix3QstB421aFDFF 0IlnViKvs1053HLRaU4/Rc0= X-Google-Smtp-Source: AOwi7QD0dUyz7w1xaAm5wpxABRPQYYgX2uMdtn4VF4s4v12cwHZ7/PZWYTnwqU+HKX357fqwI4lpUw== X-Received: by 10.25.204.3 with SMTP id c3mr5921516lfg.220.1507096111223; Tue, 03 Oct 2017 22:48:31 -0700 (PDT) Received: from huvuddator.lan (ua-213-112-0-22.cust.bredbandsbolaget.se. [213.112.0.22]) by smtp.gmail.com with ESMTPSA id h29sm3261577ljf.36.2017.10.03.22.48.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Oct 2017 22:48:30 -0700 (PDT) From: Ulf Magnusson To: yann.morin.1998@free.fr, linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ulf Magnusson Subject: [PATCH] kconfig: Document the 'symbol' struct Date: Wed, 4 Oct 2017 07:48:14 +0200 Message-Id: <1507096094-14953-1-git-send-email-ulfalizer@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 From 1586686302219032014@xxx Wed Dec 13 16:19:34 +0000 2017 X-GM-THRID: 1585591649641909533 X-Gmail-Labels: Inbox,Category Forums