Received: by 10.213.65.68 with SMTP id h4csp1112043imn; Sat, 31 Mar 2018 19:53:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/z5sshcl++RHkhZhk37ZckzcdIposb5/0p07gPqRrpxYZ2YjCvf00Wc2NN0Jp/+mCVXTJJ X-Received: by 2002:a17:902:7710:: with SMTP id n16-v6mr3523154pll.46.1522551211453; Sat, 31 Mar 2018 19:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522551211; cv=none; d=google.com; s=arc-20160816; b=bSs9hKngAIiPUaL2xY/gRn1UgLy69cpHoZYPnCAU/u/wxxVEk/PMkmQyI3kFweY2a3 +QFPKXi4rKip9ZSuyzsnC6q1wPDWnOPLRd4hCkxb7Hq+E9nEaNuWO/JhwWw1r87OGpGG SlHkjV5ZcKGAD0h+xZomNNfyxGhhk4h5xkUUkv22q51XPz7SY8kl++wlQ7UtEny6R3HR BMzghHbUdPmqyeMVECIeRDInmRAS43vSY4c0NAdJqydzShvofaDd1jqX6In0NU2K1iIB o2vwMnkZ+UDUFPgmbPoKUyp7oPgMCQMXVpGd1O2a20UFRzZKyGh/nbqc26n7Ze66ZxtH fSQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=H+IU5ESiry/6nD79TfmuKsjhxcjR/QmL1BcOzR0zjUA=; b=PQcfsn2QAwBAaxhZ3lMf8iCxVb6pmUqnZjtK1LTMJptzQdag/z4fkXNgBpr9wNCDtp wX2/scpr6rKLSwbDFFAmNnaVjhB13357k2EikabhCKU20RaLc9iwsGZNBHEhVWgZEy8B C+YIKLqSmEtOrf228aJ63g+wCDWauaWP+321wp2WN1GUEkWyfzZVpmyLTgMi+5Y4kKQe nnHJqraSyLdpYXd/l1oWaElkHx29FqRnby4bRi1PeKyPHiFISuJEt4nKTyF7BdZzgNSc GzNgW+2w9VE0BeaHkfY19s1GOitx8HpzKrJk2Lf1d6m2gO4/jkfEQLHY9vjHMLsCdsqz SHRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=evdzVQoV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1-v6si11530540pln.578.2018.03.31.19.53.15; Sat, 31 Mar 2018 19:53:31 -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=@gmail.com header.s=20161025 header.b=evdzVQoV; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753039AbeDACwF (ORCPT + 99 others); Sat, 31 Mar 2018 22:52:05 -0400 Received: from mail-ua0-f194.google.com ([209.85.217.194]:36961 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752754AbeDACwD (ORCPT ); Sat, 31 Mar 2018 22:52:03 -0400 Received: by mail-ua0-f194.google.com with SMTP id q12so7289565uae.4; Sat, 31 Mar 2018 19:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=H+IU5ESiry/6nD79TfmuKsjhxcjR/QmL1BcOzR0zjUA=; b=evdzVQoVbfmq0sgc8PDdg2sWwyMEQaPJxbqb0ZIU43AdJY/8JDtWO7Qyv+eYqo/vLL y/SpLU1rLcjeELAY/9LqWvMBWsLEPPdONVocSKSihJWDUwpY5322XmvYMCEgvbDCC5Ub 51bagdN4VCDfum85L3Wam27zKczqeCvdAe9nOE2vYXfcvoVaxtPz7vf3gvyJap0uzn1D fys8Nv2z2CT9BjYBLiW3icIO9XiGcJCDsFwoAe+cM8Qa7hqbdTf0WjZeF1fG+0Cz9hXI M81sJhInh13wWE9uf1eJ1IH7tGOKXSN6NGOyp9ANSxI3AscqxrcJe1E8SLyM8AUb3rFl uyvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=H+IU5ESiry/6nD79TfmuKsjhxcjR/QmL1BcOzR0zjUA=; b=RTqmA0oWBXiMR5XHR8VNAw2+GSPF1xpxS1H+IDpqzSVwYfD/QoYwnB//y1VquyKkdt 6lg1z2R/XQ8uZRQfVz7rgdNveuAwLk8FwECKhp2SUwaMBAw5vmT2MFLmJoZA9WKdqnwG e66mmyUlzZBu8LqUXB/lO8wJlYnIFvNtPFuE0xFcP/Qt4oM0p+9iAzkKS4N+AdCdBpfT SWg7QxPU1BV2pZ+vxWo2Tsz+HH2mp4OCyH+Q03UE7AfnjlEo0FLUG/WczpN7D5klOs0U H4M/rzmfi6V9ya6EQNFrpJhm8ddzTlknBXKBkWNFOb54ICQQjWYcPz0HURVA6CjQrGe+ r0GQ== X-Gm-Message-State: ALQs6tBH/QNcSqXU9ZxltFF8N0Cq+Z1ujpN976gWvNsFwmbdfnuuK8OZ pHJYcDdYjooV3Z9sP3DPlCpySuc+o4973Ui4Kfk= X-Received: by 10.159.50.67 with SMTP id y3mr2671813uad.3.1522551122938; Sat, 31 Mar 2018 19:52:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.206.5 with HTTP; Sat, 31 Mar 2018 19:52:02 -0700 (PDT) In-Reply-To: <1522128575-5326-6-git-send-email-yamada.masahiro@socionext.com> References: <1522128575-5326-1-git-send-email-yamada.masahiro@socionext.com> <1522128575-5326-6-git-send-email-yamada.masahiro@socionext.com> From: Ulf Magnusson Date: Sun, 1 Apr 2018 04:52:02 +0200 Message-ID: Subject: Re: [PATCH v2 05/21] kconfig: remove string expansion in file_lookup() To: Masahiro Yamada Cc: Linux Kbuild mailing list , Sam Ravnborg , Linus Torvalds , Arnd Bergmann , Kees Cook , Thomas Gleixner , Greg Kroah-Hartman , Randy Dunlap , "Luis R . Rodriguez" , Nicolas Pitre , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 27, 2018 at 7:29 AM, Masahiro Yamada wrote: > There are two callers of file_lookup(). > > [1] zconf_initscan() > This is used to open the first Kconfig. However, it cannot > contain environments in the file path because zconf_fopen() is > called before file_lookup(). By swapping the call order, > KBUILD_KCONFIG would be able to contain environments, but I do > not see practical benefits to support it. > > [2] zconf_nextfile() > This is used to open the next file from 'source' statement like > source "arch/$SRCARCH/Kconfig" > but this has already been expanded in the lexer phase. > > So, file_lookup() does not need to expand the given path. > > By the way, file_lookup() was already buggy; it expanded a given path, > but it used the path before expansion for look-up: > if (!strcmp(name, file->name)) { > > Signed-off-by: Masahiro Yamada s/environments/environment variables/ Reviewed-by: Ulf Magnusson