From patchwork Tue Dec 11 11:00:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 153435 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp476294ljp; Tue, 11 Dec 2018 03:03:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/VK1eaUxVJ7ifgOOslKyqhjblBgMWfvlNEMwNBs7qGGupTDV5zPcwbD5eXdb5MLT2fdDKHb X-Received: by 2002:a63:e950:: with SMTP id q16mr14149354pgj.138.1544526196064; Tue, 11 Dec 2018 03:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544526196; cv=none; d=google.com; s=arc-20160816; b=xxk7Wf4LeTJN/PFaUooyhJAM9P4uv5B3BxH69vwAkPSIQtw2m1ARZbKJwDwsPE/z7Q TjpmTyKMdor12D0LMDGPVtcJIQKsdbF4p3BiSjUhjLfd3FcRburQMvyxa/q7PmgBuvXu oeSOr/UDIDYw0San5OMmEzqfEWu9LeimG3w83ekXUlqDyjRoD+KsqDWPZ5r/7KnuCAFJ DREOjGWJZoD4W995YkXmTi7NUc9H9H+45qrs+4sKLCRlgTzEYc4FKfLK1gHNr0k8QU2S hV7kcJE1TDi6/TMfWLRohq3gvc29ygeMWNhctmfay7Rvlbt5Qpb2LmOuRuUQMwQSi0Xv Z96A== 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 10si11652776pgk.101.2018.12.11.03.03.15; Tue, 11 Dec 2018 03:03:16 -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 S1726314AbeLKLDL (ORCPT + 31 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(-) -- 2.7.4 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);