Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp511828imu; Tue, 11 Dec 2018 03:04:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/XApHObxP/UHQzZWWeqZ8wzApMCskM7rAvLrfXLzzEVkuw2R+pZzSmbXC1aV/ZzJm6Wal/Y X-Received: by 2002:a62:c28e:: with SMTP id w14mr15861697pfk.115.1544526281438; Tue, 11 Dec 2018 03:04:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544526281; cv=none; d=google.com; s=arc-20160816; b=dTQbtejdfFm6I/ChuYE/dfO5SMV+1gxeTEwrWJQp/t+YoJi62M59cHiToK9bWdAF+G TwqhvNUmz+HPndLHzMvoTci/+33laCPaGUGNYHCZKieKTwGBywZ97c5RDOMggK8EDM5u 9XZIwSXajAixvpnEWe7KEMb8UNR64Nh+Nlpxyem0H5iu4qoddRc5iHJhJ9w2Bm8qV8Lv BY9GQJaFkW9QCV/thtlvFfLKkqz4xJcwYw4MQvd0Jcnb2TY3I5qrL+LNdWp6D8AQO6oz u6UGKxhk9mOi03Ze9xtfnO06pbuQ3wMPRPsBSbdZ4G5NHjuZLOyZHaPjQsPNnRREx0vJ LHOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=S7ukwX6NkoGsh6wmesUTz6h4J/DCsX6bNDq3MpJLeqU=; b=VzbOpEGHNeO4zQ+Wj9I/2fN33m5wGJrs6n4HrH4meEGXEIWzM5vZZzhnqIIwFNKtZL +nplZYG0lC/YhXWjk0tfFAi9SEbguKC7hth74ky5JR30k7w59QqH+DR4B+xsPFZSLwsk +kNaA/W+mb8ik6+4lVGrfKcHfcADzwPNpSbd5yx3JKI1mp15BQRidgHDk8CugHU0or1h MVUZ0OcxC6+V/1OyTBDAeBRIRfZkeIL3Tu6hZqxy+t1J0LEZU1mgvvtbGeAXz8zlIdyf QvgwyDCK4t87JNQ0stGwDyJzIYORGP9HCbrKbN4DLdqNI90XYqVUr1v1F6RGbToBvDVl ujvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=EjeE9NkR; 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 p4si11775371pgm.342.2018.12.11.03.04.26; Tue, 11 Dec 2018 03:04:41 -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=EjeE9NkR; 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 S1726270AbeLKLDL (ORCPT + 99 others); Tue, 11 Dec 2018 06:03:11 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:36714 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbeLKLBn (ORCPT ); Tue, 11 Dec 2018 06:01:43 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id wBBB1C5o017210; Tue, 11 Dec 2018 20:01:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wBBB1C5o017210 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1544526082; bh=S7ukwX6NkoGsh6wmesUTz6h4J/DCsX6bNDq3MpJLeqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EjeE9NkRQZByf0FXmq6z71dWwbxkAE/bleCS/A96rOjI5u/UbEoBmF2s68du9Me4t +eZVn0oOt+CoDDNj4xIMaEYRTjvnwx9QxFdewaJce2cQbye3aNAQZtCCw5Iszcik5G PVt3lTAxy6C7g2MLbyylyZ2W6RY8XC80ozYPw+nf3QNmdo0VkblH2NbHpGfh9exECg 7Q5s+KlH62M4je/Q9Is71f5aoaXf8+QIRwOFIJgtSJIKH09tFiiqpL76Mo0ngt3+KC SAQ+evHHrGqVMWaFYNTF99cejzopivFULDkCTtcFxRcgCS7wNYR2ZiWIvmiCN4wpvs i+YMce7aqMgUg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ulf Magnusson , linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 13/27] kconfig: loosen the order of "visible" and "depends on" in menu entry Date: Tue, 11 Dec 2018 20:00:56 +0900 Message-Id: <1544526070-16690-14-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544526070-16690-1-git-send-email-yamada.masahiro@socionext.com> References: <1544526070-16690-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, "visible" and "depends on", if defined in a menu entry, must appear in that order. The real example is in drivers/media/tuners/Kconfig: menu "Customize TV tuners" visible if depends on ... is fine, but you cannot change the property order like this: menu "Customize TV tuners" depends on visible if Kconfig does not require a specific order of properties. In this case, menu_add_visibility(() and menu_add_dep() are orthogonal. Loosen this unreasonable restriction. Signed-off-by: Masahiro Yamada --- scripts/kconfig/zconf.y | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index eeb449b..7cc8244 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y @@ -341,7 +341,7 @@ menu: T_MENU prompt T_EOL printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); }; -menu_entry: menu visibility_list depends_list +menu_entry: menu menu_option_list { $$ = menu_add_menu(); }; @@ -357,6 +357,12 @@ menu_end: end menu_stmt: menu_entry stmt_list menu_end ; +menu_option_list: + /* empty */ + | menu_option_list visible + | menu_option_list depends +; + source_stmt: T_SOURCE prompt T_EOL { printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); @@ -414,12 +420,6 @@ depends: T_DEPENDS T_ON expr T_EOL }; /* visibility option */ - -visibility_list: - /* empty */ - | visibility_list visible -; - visible: T_VISIBLE if_expr T_EOL { menu_add_visibility($2); -- 2.7.4