Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp512551imu; Tue, 11 Dec 2018 03:05:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/V8V+3dQxd1wSAS0x2dOZcUqzzpV6HXp0yyKr7Uaxy9h3cPZQ+qA04+xSxTemE3vV7CJk+l X-Received: by 2002:a17:902:3383:: with SMTP id b3mr15315669plc.170.1544526323723; Tue, 11 Dec 2018 03:05:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544526323; cv=none; d=google.com; s=arc-20160816; b=fjIkoeVBSb7O9Cx/rvHgs9nEPTspbe82IeITP7Lf8TD62xfZ07IX2w0NOqh6f2WHQc cp7yxYRHmZHNEuOo/0qzGfgoNXYEqoP2rSGlLbfEJa2Ikt4CliG2+exsTi7ak4VvDYn3 ehIuFHI/EEQ5xJZlqh/ASGVhIXANQ05ZVRzSAvdbBCzg837dD0ln9MSAxRMBXeBq1y6o X+u5CvWLRFWQc8yQVN9JPhyqJF/72QqkhX+JjRLulxYc+Kc25FiqU1Zqa6FdwV7udBou KqHTRwwlSpe+1qmaMwT6d9Z7zRr8uOx8f0ORiMRiIQasztJdlVtfZgwGr+9VYFdzPmWc wRyA== 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 204si13173613pfu.273.2018.12.11.03.05.09; Tue, 11 Dec 2018 03:05:23 -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 S1726788AbeLKLCG (ORCPT + 99 others); Tue, 11 Dec 2018 06:02:06 -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(-) 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)) -- 2.7.4