From patchwork Sun Jan 14 14:12:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Magnusson X-Patchwork-Id: 10162609 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AACD160245 for ; Sun, 14 Jan 2018 14:12:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0E912891C for ; Sun, 14 Jan 2018 14:12:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93B3128A16; Sun, 14 Jan 2018 14:12:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 383CB2891C for ; Sun, 14 Jan 2018 14:12:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751305AbeANOMV (ORCPT ); Sun, 14 Jan 2018 09:12:21 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:43294 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751101AbeANOMV (ORCPT ); Sun, 14 Jan 2018 09:12:21 -0500 Received: by mail-lf0-f68.google.com with SMTP id o89so6414808lfg.10; Sun, 14 Jan 2018 06:12:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=SxWvk9cVKEGWCOSBzGKB9u18NbAl8zutidQtmISGDvs=; b=J0eVS29D300JbCxzPdvIZ5fJ1z/cTJ3MkYuIZ8hf2WDhxok0zAoFEiWAHGeXr3Aspq umSexkGO0kXzr2X2w8Aqi/NYtc0jWnVHKYL6ZB5cBy8wMdi7a2gS6L/d85v+MTjEqVgQ wKKHsHPAqvxFXIiZyoSuXmjyf2fcwXpsyArhXKdxsvC7gUoKbnp9DQt9bQOI9I8UHNEh vkbboGeml+TFoytGfz07S9UBntDvB7w0BNkPZ8OrLSaor3xLnjYlGmf0amJwja5unT7i 9NhpD4+S2q8lRL68bzz+F434XvwGX3j3zPkwzLFuWDdAHiwzz9k8J9AfMn+oSPfkK+Ou po+A== 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=SxWvk9cVKEGWCOSBzGKB9u18NbAl8zutidQtmISGDvs=; b=ppFCeDh4Bizq7VX3Cbhjsq7yRxYHbKB8GWVgM7d8z3sylwjIXk2YnUgAqru6k0eCVH 8cSDG47N9rSLdsuAV6snV70912vBuqNMTvQILXOOVl+u9VKwyfSJDDMp45ihsSttoKBT myppYNDQnAJuxxNo1bMlryZJnLb1FyTyq7+PPHKab1Vhc6pYon4zhJv0PqKPI+etjic5 ySLww/G8PxQT8Ou6L/mqaA9v5AEw5WMcBOKRyz8jjA2IP1dHDUSOeOXZS18odaj0OZfw DgqGPaLnkHv+Tl4/z0i+/A1u/4zFNF/0QZX1zVnjxEJDKSnCC1zZkWTo1vUYFtfGIxW9 V9BQ== X-Gm-Message-State: AKwxytc4GgL6C2sUiyOcFc+np3sQ1+mmzfVsypXxQxApyZbI78psqa7H oo/sKdYKe12ygfaEIDwepbFnqZQx X-Google-Smtp-Source: ACJfBosTpp85mq4FOJT7nHMMFQXtiotufypWGmX6XQlJUtR0p/ZjFeXdVyGA6bVbmzF3AxYOl45WiA== X-Received: by 10.46.91.23 with SMTP id p23mr3544026ljb.145.1515939139292; Sun, 14 Jan 2018 06:12:19 -0800 (PST) Received: from huvuddator.lan (ua-213-113-106-221.cust.bredbandsbolaget.se. [213.113.106.221]) by smtp.gmail.com with ESMTPSA id p14sm566799ljp.80.2018.01.14.06.12.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jan 2018 06:12:18 -0800 (PST) From: Ulf Magnusson To: linux-kbuild@vger.kernel.org Cc: yamada.masahiro@socionext.com, sam@ravnborg.org, linux-kernel@vger.kernel.org, Ulf Magnusson Subject: [PATCH] kconfig: Clarify choice dependency propagation Date: Sun, 14 Jan 2018 15:12:05 +0100 Message-Id: <20180114141205.26814-1-ulfalizer@gmail.com> X-Mailer: git-send-email 2.14.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's easy to miss that choices are special-cased to pass on their mode as the parent dependency. No functional changes. Only comments added. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 92d3f06cd8a2..53964d911708 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -323,6 +323,13 @@ void menu_finalize(struct menu *parent) if (menu->sym && menu->sym->type == S_UNKNOWN) menu_set_type(sym->type); } + + /* + * Use the choice itself as the parent dependency of + * the contained items. This turns the mode of the + * choice into an upper bound on the visibility of the + * choice symbols. + */ parentdep = expr_alloc_symbol(sym); } else if (parent->prompt) parentdep = parent->prompt->visible.expr;