Message ID | 20240202155825.314567-14-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-50073-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp524784dyc; Fri, 2 Feb 2024 08:02:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYjotDCLlsxU7NL/FAD+J3tNJRqH5QKY44KiGgNDqVsyFMXI31itqo1tm0GsOH5OXcdH5e X-Received: by 2002:aa7:d497:0:b0:55f:6b8:b2fb with SMTP id b23-20020aa7d497000000b0055f06b8b2fbmr82953edr.1.1706889776963; Fri, 02 Feb 2024 08:02:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706889776; cv=pass; d=google.com; s=arc-20160816; b=ogpZW3t/TqgwBE6YZusBno4GFKrIgovyc60AjHNht+/zme8gdwnUnKGkP6+V08hu3l pVfDHRY/+3QfCOt3q8Bcc7uew0DF48CumhNpzuJUrwYl7NwTI1u8w0vPkYTPWLvuURga YNgz/LAkR+/Y8ULsSq/nfEqF2RCeXjOFobv85RRlU12Dxng4bhFHzFtfdqd5tqPolUfV i3FDF93wpvWlkbv3PkH59idW9hnuv6VRc4iaTsYvER2BHZMYSczM3WEvTmAjhH2GaAG2 38EpsehUg+lY6DWrkmdn0jfjsbdMW6P40ZJ01VcnhPAKYcBom5TVFMmVunXhn4RhA/ZK GJ7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cmkvO66yCzqBLo7bvX4MPYC6PO1rABxxI6afIsfoo2E=; fh=G8A8T3N7eB0jrAf5QTAdmp2IdzTXjw9BmSDv6M28ANM=; b=rt++T7B/LXr9x85m1jjBOX7voWfsMhEaoQGxfNwtEMfzwH3zyEUr8lx87YNUFhJVmx /hY624qJfAKKngr20k1vNkAOq6vNwmLhWZcY1FO/JXAYlH8SfqB/pBiXuEkzpwN84I0o LT+tiC2w7OS0Wn6nUA9gzX6Ygoh69agKJ784tPbcKXOK/5tEeJAIMxGowVxeK5Lqbchh 59gZLB2HQHTrsXbvOWEAp9JehiyiRcqTnJB1PDdlI0qoY8xZUEkZvVQImC1RfAz0uz2Q Bv9YQguxtpdWLg1kUSd6fD/6Eegv5jOR4hNSsvCSRIR0rFzEQSnHQrl28tRWovJ+d3Cz P+rw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lt21hQpl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50073-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50073-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCV8CtF+9u4pQve/N0KxQTzneI2D15Zrq2OBBoqArCyLSE0PcZi/jCybY764GmgRDjtW34jSVnla3hJbw1YOPEkg2uwbGQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b5-20020a50ccc5000000b0055fa3cf748csi889826edj.175.2024.02.02.08.02.56 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 08:02:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50073-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lt21hQpl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50073-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50073-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8C7B31F2279C for <ouuuleilei@gmail.com>; Fri, 2 Feb 2024 16:02:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B25714D43E; Fri, 2 Feb 2024 15:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lt21hQpl" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79229146916; Fri, 2 Feb 2024 15:58:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706889525; cv=none; b=jJSjd8Z/hae/rwvbIzxusJF9/yFHKFZ4DCYdwJs8MTtYBE3/2Q77gLMgCmX2hZ9sTfF+5LhdTVn1NGqtqeel5qM0JuGj3GvfvWaA8LfuyWkUWlqszWeBwKCeXRjJmkxTrCm0sqJYl/7TQNhTHANDZYQYIBF1i3NrDlv0Ee85UJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706889525; c=relaxed/simple; bh=3mNf0ZSZTDvEBfE5C19X3m4Dwgk1+kn+7smzF28GagI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s9nkBG7it1P5pDRky9Moqmflh2YkpbWO+Cbh+m820nwk/+5UJafvRrsUqiclou+15T8T49QELilj5Jza/aEjsnRjrJ3o55ElQP3vphIhE8FKG/hgcI3PQ9kcGmPgqsMZVEFOs3R1Y2sBAu0Qd7lmDbL/iArY/l/HyNiIuWOfVds= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lt21hQpl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49ECBC43390; Fri, 2 Feb 2024 15:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706889524; bh=3mNf0ZSZTDvEBfE5C19X3m4Dwgk1+kn+7smzF28GagI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lt21hQplVb5hpQcN3B1YGxA27O40fqtkxEjJknCLhtioRhIMsTNmsb2AaIeWKOaTB Y4f8jNCpoET6elOnrKzGV5o19M3YyeAiJn872n6ngh9D6m8QOMm2wtlai2wuap1aGN oV9tD0Ny4rsv+vCq6fY69G2Zy4vxnoy9SRRlu8A7PpDB0pJDom37XqBJxtiEGzv/Nw K4oM3fpAH+dRbd+SBKgTOsk31SoNWBy98uCB3uuvDPxt5s0kF4J+RzkrME80gtZlNi 1ZC+5LmxzFpsP/d7YNQ0cXArHQ2TR90yD/q+IJgRda+P0tOJPTReTHSsenHzpME11d sMjETBZ+AetuQ== From: Masahiro Yamada <masahiroy@kernel.org> To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org> Subject: [PATCH 13/27] kconfig: replace file->name with name in zconf_nextfile() Date: Sat, 3 Feb 2024 00:58:11 +0900 Message-Id: <20240202155825.314567-14-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240202155825.314567-1-masahiroy@kernel.org> References: <20240202155825.314567-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789803654607412525 X-GMAIL-MSGID: 1789803654607412525 |
Series |
kconfig: refactor lexer and parser code
|
|
Commit Message
Masahiro Yamada
Feb. 2, 2024, 3:58 p.m. UTC
The 'file->name' and 'name' are the same in this function.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/kconfig/lexer.l | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l index 3b3893f673dc..35ad1b256470 100644 --- a/scripts/kconfig/lexer.l +++ b/scripts/kconfig/lexer.l @@ -420,10 +420,10 @@ void zconf_nextfile(const char *name) buf->yylineno = yylineno; buf->parent = current_buf; current_buf = buf; - yyin = zconf_fopen(file->name); + yyin = zconf_fopen(name); if (!yyin) { fprintf(stderr, "%s:%d: can't open file \"%s\"\n", - cur_filename, cur_lineno, file->name); + cur_filename, cur_lineno, name); exit(1); } yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); @@ -432,17 +432,17 @@ void zconf_nextfile(const char *name) file->parent = current_file; for (iter = current_file; iter; iter = iter->parent) { - if (!strcmp(iter->name, file->name)) { + if (!strcmp(iter->name, name)) { fprintf(stderr, "Recursive inclusion detected.\n" "Inclusion path:\n" - " current file : %s\n", file->name); + " current file : %s\n", name); iter = file; do { iter = iter->parent; fprintf(stderr, " included from: %s:%d\n", iter->name, iter->lineno); - } while (strcmp(iter->name, file->name)); + } while (strcmp(iter->name, name)); exit(1); } }