From patchwork Mon May 27 14:37:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 165218 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp7256655ili; Mon, 27 May 2019 07:38:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6zufY3743jtPKNTY4AT2npkk5PhoWZA42PjIK8VM1FQab9wTjcGfIO9Il6m2kJMlw5DXY X-Received: by 2002:a63:6a4a:: with SMTP id f71mr125578909pgc.44.1558967896081; Mon, 27 May 2019 07:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558967896; cv=none; d=google.com; s=arc-20160816; b=y5Oe+8cLMcNVWb2psa4lCQALoOT674ENrjGu4iOS6PJcsBgN1Ue6nxqG+kXFVkZlGe e2UyjPQMMCgz5oB4NLnKDL76s6Y/GYmlz4s9N3AX+Ew6+Qp/lCixVz6g10H+kKv8k6s4 0t9qA9RSggroP064Txi6akRsrZL5vlJL9xbonP5SAWWmy3cNPzvY/f3EN4UnnNlldtPw Id724fj7FEcc91zF/HCSTQ8jSl3gjxMGqYGAuZqUnshjHp5ILGeXafSlVe6QFc2lPVlu WFQkggsmJNiLwabH6xh5OKUYreEJlXVEbt+ngdfpD6YlZfvl+zxPjHOIKNjEaSylJKpA bQKg== 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=/zTtilR7M4J4kCF0RKv9Y1GiD2ryX7m/r3u5/1Gg4xY=; b=C+5Yuhipqk0n2AhXn8YlAd4TslVdIoLhJSR6Aoop/ywntL6fVN+XbtYDBEdgUb4azn UCIOM8vX/BV8lvIxrl4OaRMFBVKY+a0EKl7Zp/bbvJ+N5gW8HfWyjwRW36nfOr4a7FY/ 4VXKLRQvzBapo1T4Hl0XFe28NKM2N29pE6ZDpjSSAs1KlQOsvRKKdQ97kKbx880ZnCek 0InR6iZSQnfJh2tk/PnOBgstuA38C7pv3W6sHH9KwJDdk5I2ZubesQIQu9ij3RfCEbMW HtXQ5iEGyBQQifsYtAq7Wkj2Sk4h3L1wqv8Z8uvgCm+meX8k42OIx/chMKQwRbSRFcjz cZ2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=opYfNt7b; 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 j184si21190181pfb.88.2019.05.27.07.38.15; Mon, 27 May 2019 07:38:16 -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=opYfNt7b; 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 S1726844AbfE0OiP (ORCPT + 30 others); Mon, 27 May 2019 10:38:15 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:41825 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbfE0OiN (ORCPT ); Mon, 27 May 2019 10:38:13 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-07.nifty.com with ESMTP id x4REc8hn015915; Mon, 27 May 2019 23:38:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x4REc8hn015915 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1558967889; bh=/zTtilR7M4J4kCF0RKv9Y1GiD2ryX7m/r3u5/1Gg4xY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=opYfNt7bTYg39YtrTA8NuGzgoBDR5IT09agU0DONpGcCIFEJ4OWZdHH9Q+k7/L6cv YNfT9Va9zKx7XM1sMI7soKbLUBcBeTzpkXyVL1NDXKC41gwsEelKrOvNrVy03zNVuS /0j3KmiL54pQawQjj5kx2t281GvlhDrnC7U8Ck4XgSdv4kGWq6OJcsoY7zaMQj61xr XhdmuvYayElmtFZgNcH0+GG6Y1/22+FEuztf8qI5SukgO5V9A7SJAaUVJUuBBMfFPY DQA9aFH6iyx7eyERSfY/5RBhV38A/P3+wG2Q6Y856fANjLo2sBMN3tQXu+0zilNviP MnoN5MaiwrceQ== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 2/5] kconfig: require the argument of --defconfig Date: Mon, 27 May 2019 23:37:22 +0900 Message-Id: <20190527143725.12542-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190527143725.12542-1-yamada.masahiro@socionext.com> References: <20190527143725.12542-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, the argument for --defconfig is optional. If the argument is not passed, the hard-coded default arch/$(ARCH)/defconfig is used. It no longer happens in Linux since the last users of the default are gone by the following commits: - Commit f3e20ad67b4c ("s390: move arch/s390/defconfig to arch/s390/configs/defconfig") - Commit 986a13769c4b ("alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfig") I want to kill the Linux-specific directory path embedded in the Kconfig binary. The --savedefconfig (reverse operation of --defconfig) requires an argument, so it should not hurt to do likewise for --defconfig. Signed-off-by: Masahiro Yamada --- scripts/kconfig/conf.c | 4 +--- scripts/kconfig/confdata.c | 17 ----------------- scripts/kconfig/lkc.h | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) -- 2.17.1 diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index ef3678c24bab..0d4c4f3a8f29 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -451,7 +451,7 @@ static struct option long_opts[] = { {"oldaskconfig", no_argument, NULL, oldaskconfig}, {"oldconfig", no_argument, NULL, oldconfig}, {"syncconfig", no_argument, NULL, syncconfig}, - {"defconfig", optional_argument, NULL, defconfig}, + {"defconfig", required_argument, NULL, defconfig}, {"savedefconfig", required_argument, NULL, savedefconfig}, {"allnoconfig", no_argument, NULL, allnoconfig}, {"allyesconfig", no_argument, NULL, allyesconfig}, @@ -562,8 +562,6 @@ int main(int ac, char **av) switch (input_mode) { case defconfig: - if (!defconfig_file) - defconfig_file = conf_get_default_confname(); if (conf_read(defconfig_file)) { fprintf(stderr, "***\n" diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 6006154d36bd..18e8051d89d7 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -177,8 +177,6 @@ static void conf_message(const char *fmt, ...) static const char *conf_filename; static int conf_lineno, conf_warnings; -const char conf_defname[] = "arch/$(ARCH)/defconfig"; - static void conf_warning(const char *fmt, ...) { va_list ap; @@ -233,21 +231,6 @@ static const char *conf_get_autoconfig_name(void) return name ? name : "include/config/auto.conf"; } -char *conf_get_default_confname(void) -{ - static char fullname[PATH_MAX+1]; - char *env, *name; - - name = expand_string(conf_defname); - env = getenv(SRCTREE); - if (env) { - snprintf(fullname, sizeof(fullname), "%s/%s", env, name); - if (is_present(fullname)) - return fullname; - } - return name; -} - static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) { char *p2; diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index cbc7658ee27d..4fb16f316626 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h @@ -49,7 +49,6 @@ const char *zconf_curname(void); /* confdata.c */ const char *conf_get_configname(void); -char *conf_get_default_confname(void); void sym_set_change_count(int count); void sym_add_change_count(int count); bool conf_set_all_new_symbols(enum conf_def_mode mode);