Message ID | 1526537830-22606-11-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1884198lji; Wed, 16 May 2018 23:27:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrSTPx1nEd63WiMkSJrx4z/ky0k5JlMOUf8wtTgTTQnHMATGMlbD2NpkzW5UQSB46Pa6c2O X-Received: by 2002:a62:6e88:: with SMTP id j130-v6mr3952893pfc.111.1526538449937; Wed, 16 May 2018 23:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526538449; cv=none; d=google.com; s=arc-20160816; b=Pljfw+7rMvBKtCDPQbWNMicVtcbFoedZ3uKJK30at3fO+MoSjap4TedbcK/KxuwuyU G3FIMmM0HAlhbJPjowLkyUIrm56tmdJlMSSYZ2LIGaLyj3yg7ix9afrmwhpUsQdmAvrt d0kFl7Xkk1STPUSnybn0KbyqTMtvJZWVhO5LGPC6FlokEH/c1NUqKiBMIAzsyO6Fdtgo I/RPfCZvOq7JX1aL/PgeHMz4wLeWB0BXjQ33s8MAVwRrlhbaoz8aaANKC/vkJsLBzQPC IWZSMPp5vQyTMIv322o4xoZW/L8JfsklpIxfYWk+5f00B1/Iya3gL1tOMVMiPwKLWOEQ DKpA== 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 :arc-authentication-results; bh=ev13EQg+Fb21HkwbjGskqndoCB7FTTawPLIFXDlwNXg=; b=UaJPV963Fl6JhV6TjnkuZPyql2H0L7mUyCtojg/654cEBfD3mJCq5MLmMOrTgM2t5Z KoHmvo4wbW0mED/n4obZC9W/c+QHrpxsGk5U0YYrDZfn9evuknstydC7sqFYteglXG4j +ikISqYQVcgPbM+E9iDr3zYoBvEh/eIdLbSA8Re68b6/YUsXc74E3q3guJrXbIdxMEOQ 8y2mmvuFmpi1oSkJPD/ZyOsS/ZUJHPjWnvEPOZytu7DnKxrVU+HWdfgbjorX4HCdS3Lg qCBXAXZM8PuRnl2V+eIiPcucdNNGq/6Y9A06Q1tnhl8rIXJsba0mwvqPJdY3RNHNR/H4 KCMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=VUqMlFWj; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9-v6si4496922plk.516.2018.05.16.23.27.29; Wed, 16 May 2018 23:27:29 -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=@nifty.com header.s=dec2015msa header.b=VUqMlFWj; 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 S1752358AbeEQG1N (ORCPT <rfc822;ramon.fried@linaro.org> + 29 others); Thu, 17 May 2018 02:27:13 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:24212 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbeEQGSv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 May 2018 02:18:51 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id w4H6HbU8002841; Thu, 17 May 2018 15:17:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w4H6HbU8002841 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1526537868; bh=ev13EQg+Fb21HkwbjGskqndoCB7FTTawPLIFXDlwNXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VUqMlFWjgJs71TamqgFKrU462ZOQ6hm4M5D2+fAr6GWCm7niTfBEw+TqjlN9MENck TbuKk5Y8GuVTc0r+A+1shVS87qC8WwGdt6kzElxlYwWPYOJcNHGfHH1BX4V0BdFqEU 84KQNhLhmBWKx1QSlzheXEf6nnfrGbMD6upbKkdO+nEtokE0bt2m0fkespWlUPR6J3 F/Ll60drFi5ixykMpjpS/tusgmiGmvuwctTaU6aCRx/GTsBgD0P6I7n/YtkleLw4SL CGWIA+VIlcCssQiuP3U/Az8KFcD5Q2YbhenLlMH/+a8bOQ0nTFIiV/5wFLmm0dhGwe cbIlJI1f0FZAA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada <yamada.masahiro@socionext.com> To: linux-kbuild@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org>, Sam Ravnborg <sam@ravnborg.org>, Ulf Magnusson <ulfalizer@gmail.com>, "Luis R . Rodriguez" <mcgrof@kernel.org>, linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>, Kees Cook <keescook@chromium.org>, Emese Revfy <re.emese@gmail.com>, x86@kernel.org, Masahiro Yamada <yamada.masahiro@socionext.com> Subject: [PATCH v4 10/31] kconfig: begin PARAM state only when seeing a command keyword Date: Thu, 17 May 2018 15:16:49 +0900 Message-Id: <1526537830-22606-11-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1526537830-22606-1-git-send-email-yamada.masahiro@socionext.com> References: <1526537830-22606-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
kconfig: move compiler capability tests to Kconfig
|
expand
|
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 9dc5fe3..5e53348 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -102,10 +102,10 @@ n [A-Za-z0-9_-] <COMMAND>{ {n}+ { const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); - BEGIN(PARAM); current_pos.file = current_file; current_pos.lineno = yylineno; if (id && id->flags & TF_COMMAND) { + BEGIN(PARAM); yylval.id = id; return id->token; }
Currently, any statement line starts with a keyword with TF_COMMAND flag. So, the following three lines are dead code. alloc_string(yytext, yyleng); zconflval.string = text; return T_WORD; If a T_WORD token is returned in this context, it will cause syntax error in the parser anyway. The next commit will support the assignment statement where a line starts with an arbitrary identifier. So, I want the lexer to switch to the PARAM state only when it sees a command keyword. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- Changes in v4: None Changes in v3: - Newly added Changes in v2: None scripts/kconfig/zconf.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4