From patchwork Tue Dec 11 11:01:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 153425 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp475070ljp; Tue, 11 Dec 2018 03:02:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/X0NjsduHSXsdLhEXXAAiIVy9L2u+XDHwP+gHJ5oycCrd9tQPkwSmCMHZIcrJiigJAI/gFe X-Received: by 2002:a63:af18:: with SMTP id w24mr14260903pge.385.1544526129392; Tue, 11 Dec 2018 03:02:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544526129; cv=none; d=google.com; s=arc-20160816; b=ZDmbk68oj26bQcvQ9E3qGzTzdMNVltL9u2p0je/gmfJU6mwltT6mTymeBmTFDu+pVg Rj96Cg9UFCsiBizpOhzxW1HL7QttKTkrCx4iUABGctbVc7e9VPRkUdGx6hDndjYqk6TF ZKppP+oTbTE5sJTA8m42oSlhvqlcfMIA0ucHh46BQ0ySWZt/tmL+BbeC/aARCT0+0Ef1 r35+RI+2pvD6QtEKwIe4SQIIcodxQwr4QP47t3fx7DPOvhWVI6EaLKhNz4LPTTpmq249 Jdi3hT46W587ypTtZYrAGNJO3qrpCCjKRqvXbnpgh+ZrRfmztLJgwCStmnA2NXENjQlq Np3g== 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=XFpsRQgZt6zvb7DKTN9C3r7E7nhS5P7194SgXasbn1g=; b=PULeT6SnuQP8Q0f6dS9xFCZb1gJsGR2PYAVD3iF67mm+XeoY1Wdh4aPdEBD7YNQfcA Wr9T3KF385dadtzWCzdqIihA+m7UEreIMO04ni5+xHcRc2at1LtqfUIx3oRbFqsJQqBg aVWo3roulbY8KVEWo3qzVtQcUfsFoIBT6YGx/1tPa51eBfY/n8QBxj6aNBqD+K3BapsE QIFav0nJF3T81rwOKKg8PedgyqPypRwJSl7i907jWgc8Lh2EZy+fHy09Lkl6OTvO3kU3 d2qFH8gd7TFN+8krXtxUFCaN0fhqWJmyG+y1D8JgHSFd19+yhQGKi7oTKaUTz3ELmAIC fOOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="ZF/3yxsw"; 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 c3si11706031plr.178.2018.12.11.03.02.09; Tue, 11 Dec 2018 03:02:09 -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="ZF/3yxsw"; 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 S1726792AbeLKLCH (ORCPT + 31 others); Tue, 11 Dec 2018 06:02:07 -0500 Received: from conuserg-11.nifty.com ([210.131.2.78]:36861 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbeLKLBu (ORCPT ); Tue, 11 Dec 2018 06:01:50 -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 wBBB1C5x017210; Tue, 11 Dec 2018 20:01:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com wBBB1C5x017210 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1544526089; bh=XFpsRQgZt6zvb7DKTN9C3r7E7nhS5P7194SgXasbn1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZF/3yxswEeQ9IdyVhvua72SdlmD73OUFIQJj9jYCgIcEAbe+4w8E2zIU1PYYFZgwt mkQTUuCvmoTsaZ4Hf3csIV6UroMQx9+j7Wt6DgBhb0TffRSYaYCKVIuCZeOq3S1mwF DIJdeyb6/jcr0Y3ptp/N1/sQIS5vV3HuaCsD34WGjptaShH68O8P0K66DJ71r1m2c4 pLWAzK5lCAEWCUrF9l/Q+mjzXSvEKuCBu2gt4gxVWyAbgdP6hVYbEInQcViVj6HRfV khe1rDJOChbZQt/R0fzlJbyYGQ5rvOJuF6W8V/b1NW9hp8xdPZ1QLwPx6ZvRna1OLy jkCQIaJd/e46w== 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 22/27] kconfig: ban the use of '.' and '/' in unquoted words Date: Tue, 11 Dec 2018 20:01:05 +0900 Message-Id: <1544526070-16690-23-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 In my understanding, special characters such as '.' and '/' are supported in unquoted words to use bare file paths in the source statement. With all included file paths quoted in the previous commit, we can drop this. Signed-off-by: Masahiro Yamada --- scripts/kconfig/preprocess.c | 3 +-- scripts/kconfig/zconf.l | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index 5ca2df7..b028a48 100644 --- a/scripts/kconfig/preprocess.c +++ b/scripts/kconfig/preprocess.c @@ -555,8 +555,7 @@ char *expand_string(const char *in) static bool is_end_of_token(char c) { - /* Why are '.' and '/' valid characters for symbols? */ - return !(isalnum(c) || c == '_' || c == '-' || c == '.' || c == '/'); + return !(isalnum(c) || c == '_' || c == '-'); } /* diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index defb722..b715af9 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -167,7 +167,7 @@ n [A-Za-z0-9_-] BEGIN(STRING); } \n BEGIN(INITIAL); return T_EOL; - ({n}|[/.])+ { + {n}+ { const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); if (id && id->flags & TF_PARAM) { yylval.id = id; @@ -177,7 +177,7 @@ n [A-Za-z0-9_-] yylval.string = text; return T_WORD; } - ({n}|[/.$])+ { + ({n}|$)+ { /* this token includes at least one '$' */ yylval.string = expand_token(yytext, yyleng); if (strlen(yylval.string))