Message ID | 1527499328-13213-12-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Commit | 9de071536c87cb814e210bd762fcf7f645d514a9 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2596112lji; Mon, 28 May 2018 02:29:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqpOwOvCr3S+82jK0KEduhtLalew7C2c3P2YthupovCi20RNdA2R2nXzjmXc8NSWkD/+YM+ X-Received: by 2002:a63:7804:: with SMTP id t4-v6mr10218445pgc.323.1527499792162; Mon, 28 May 2018 02:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527499792; cv=none; d=google.com; s=arc-20160816; b=lZ0OSXxMHbe/oFOKn5Q9suqrCmyzRnM9avwU64bwbrnt6AwOSKGpKVHbyrz1xBalPQ 82GmKWgWrC4KMbBI9uaEerLF++W5OegIId1H1JbYsdNrxyqstEvigRceBc/BpCgeJ/wY 3NG3O4CzQXufHbGchhRxp4gk4uAGLZwaGhePhObuX8gCE4BdvCXc5VG56smUJYI2B19K FxlieX7zq/5YZIR9BXP7R9AtWAJEELOpCo4xUMvahonxJuXsmoi4yOD7E0CHcTev+1oO l5ZKAb3LgAx40/Ol4wlD4XD1ZL7DvturJTXY14TFnoP8Oqd+IYLblukNpWMJPADEqB0b Kmww== 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=vAy22p2EOlKxrkyyKFQXW4coGIYwZi29YzZ3Dr91Q+Q=; b=Jg3WpPu0gWILdMYuCq/yF2i6zbnp6t2GtbZwSVHhZ1htyZcaWhrJgHT90Q8e5GX9fk rqJEE3CSpMG3XEJGbfGvEEjfWdV76pvCWSLs9lkSupawpHumTzypkaRxCob0xnPxe4Tz vW03ez7WTnM4Osuh5kfVI3bfO86BfwUl2sXq4SNxzg1ylGXoRlzlErwc/fZfmIGh5zLH uUB5R09F2CIEp9Z7m/FWKJqeH8q4F1OhjHB4OEz3fDlWcwqyX9sGWKWovYj8xj6QWEFY vifYAKekdl+iD4lsGag8NvJGGeGBqCa+Slssnws4osrkSdX7Sgl+G5NfqvbfuUoY+HYn UXgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Q4hCNZdb; 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 q3-v6si22669389pgp.95.2018.05.28.02.29.51; Mon, 28 May 2018 02:29:52 -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=Q4hCNZdb; 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 S1754457AbeE1J3q (ORCPT <rfc822;ruslan.trofymenko@linaro.org> + 30 others); Mon, 28 May 2018 05:29:46 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:21618 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754324AbeE1JYQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 28 May 2018 05:24:16 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-10.nifty.com with ESMTP id w4S9MInS027506; Mon, 28 May 2018 18:22:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com w4S9MInS027506 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1527499348; bh=vAy22p2EOlKxrkyyKFQXW4coGIYwZi29YzZ3Dr91Q+Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q4hCNZdbjYXxw5MXA3isYTJHKQrSyXuwKKlVGP/zKM/RrxsWnQ6IVU02m9CNx1Q4R kxwA4cFPL8fG87OqA8ieubgGC+77LPyN+v5fgNTIZl858kg1gYJ10KivDJ5bz1qg8d hRrGFT/s3xCooZcr1buySwtfm7bV/ctPcMjGFIotsRfSP/wS9Dy4CNj/Q9tYmw0NxV n9LDxAgUSl3Wry4BtPWOqoHYVCr0xjgvNzXXTJRQl2b6RTKKd0CRPApdj4DKN7XiP1 FCdmC8VKe4Rp14LRKTiLWea7DHcQ5b6K9r8G0OZtTr987qcqvS/w/EkBP1u9KBcC3N QKpR4e9MaXjIA== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada <yamada.masahiro@socionext.com> To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kees Cook <keescook@chromium.org>, Nicholas Piggin <npiggin@gmail.com>, "Luis R . Rodriguez" <mcgrof@suse.com>, Randy Dunlap <rdunlap@infradead.org>, Ulf Magnusson <ulfalizer@gmail.com>, Sam Ravnborg <sam@ravnborg.org>, Linus Torvalds <torvalds@linux-foundation.org>, Masahiro Yamada <yamada.masahiro@socionext.com> Subject: [PATCH v5 11/31] kconfig: begin PARAM state only when seeing a command keyword Date: Mon, 28 May 2018 18:21:48 +0900 Message-Id: <1527499328-13213-12-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527499328-13213-1-git-send-email-yamada.masahiro@socionext.com> References: <1527499328-13213-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 b385590..9a14797 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 v5: None 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