Message ID | 20240202155825.314567-3-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-50061-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp523705dyc; Fri, 2 Feb 2024 08:01:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHIdLVR0f1jEs2jM8G7R+46BNyRPRV66Ik7N1TJxLArMWwX+d8hYhCp5syCPRMVn+9GeD6J X-Received: by 2002:a17:903:264a:b0:1d9:44d4:706b with SMTP id je10-20020a170903264a00b001d944d4706bmr2591806plb.50.1706889699340; Fri, 02 Feb 2024 08:01:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706889699; cv=pass; d=google.com; s=arc-20160816; b=o6i4jBIrw6VjxMmvrmlYHD2XSKcUXyiiXgrRqFQBlN5NXekOCJvqgRyQbk3CLml5FH iBg3Y2PPBkLrfj8hFcv2EXSzGV3w74WQtFJfRfwUJcR+AX50swnEojEzgseJmYAiFaoi wXQwNDqFbGW2PknRh4x3lLt1PUhJNAl6mH0uH3sL9OmsagNZKIAOSQxdFbDav97nuU6Q phd1GxP43RAY/mt4+oOeDaJ0JWFSK55TkWauPZc1lnPgv6oB3VUxthj9G9W5oAMiO7oU Fc9ZkcfyYkot03DkVpBQ+Ro1r84f+ptjSLLRplI3Qo1ZWHlP2vEJ5i6mctgt+s+HkbDk TBqA== 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=lh1YRqpDh4hbfZ8d436gOJuB3GsfKTSdM0GHXVoEWBo=; fh=T5Mx87QQOTmIYe6ojhBO7671EJrsVjL/uuFxmk9exBE=; b=FzrLEwsuvMl9RYuNnLOap3zeIH2/XbQZYHkZKT8KJONsVzMhtVtXtBotGmNM8/+K6P E0YenlbF7fmKYrjmSTXAXgImYAmLx7haSAftMfwZexsZo3vtITGnKp1SO6Yw9qQXDF7l n3hg0+GDaCecTE7OUsejtK0huHjBBow46lSsGexIcIzxjJIu9gUdfntpzEonm4UU+yh1 s2XsXN9E8YlX9+28pm4mtjZ0zJOexeNGLelW0HRH49/Gy2uNnNd7cjlLfOpg/1rc/GK7 rKtxFo4GvktazJmj8omBVcwIwy7i+SDbBmcpOCYfy6+rsktL420b7VC/fqwPEKksOcsz BpIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NpuPqRlk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50061-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50061-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUDPdp0iE6XuPC95HSpDozHQeFzAzBn7mY5rTO5H7TdGjp52NNaMMIFUUEH+fQE8qgtgtXl/ZNQbPEHWhtrHNh6zkMbDQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t10-20020a170902d28a00b001d9176f56f7si1839204plc.462.2024.02.02.08.01.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 08:01:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50061-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NpuPqRlk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50061-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50061-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 93765290F91 for <ouuuleilei@gmail.com>; Fri, 2 Feb 2024 15:59:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D949E1487EA; Fri, 2 Feb 2024 15:58:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NpuPqRlk" 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 1FE5C1482E3; Fri, 2 Feb 2024 15:58:32 +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=1706889513; cv=none; b=AxcEewD3rokcQkAwVQfzhPogE7TbmhgEWMMfHISJ5EntoiMu3342eBcoQRt4sn5Ba02jsR1feh71ORLF8jqAmefDh7Gx51+34cvBHFMmH+ACgyRBr+nYkP5DxCvmiT3HYxWmAs3/u34du6SNkIUJCXqrPA2blqMYcf62XuoV7Ug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706889513; c=relaxed/simple; bh=iLMWYG9L/UfAHJBH+yDa8fL9Z1alCW8nTVuRLWkFGEM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WjYCTjxD1AeVcetxnhD7toIsUiLAcLmmeA7s9i395WgDyQhLIo6vvGiul90mhljtXLLv8/A+dxovVkGsHkgTk2iofpNJqE6M+Ds31qcxyu/znJvLLkvw9PtxAmpJ0GK0YQhR7KyemTmwazfWKxk9wLINPSQs+sZOE3imf3hrLaE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NpuPqRlk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 061D0C433C7; Fri, 2 Feb 2024 15:58:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706889512; bh=iLMWYG9L/UfAHJBH+yDa8fL9Z1alCW8nTVuRLWkFGEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NpuPqRlkvGyBwYgYUT16rib5rySaETzs/nqVuIY5CKa0/laJ4lhuboWHFRZt9MFy5 dCj9jM44SzStc7QpKiMe1vsKJOn/fc6S7Rs6V2BuVOxJH0M6KroAPtk/5ZZlhCQuEe nzwmDRMCvvdFcp8NbwV2qQyep08nevb+637wq2lH6LsBgA/lXgdSwozcjLVUWJPf3d qa4ABjM8q4MswOH+92fwi/aqmgatahYy2VEE3tHNvYC5xk0feDEAdcbw0WlQ3HeWOM ZXv/ZhGaVwVoSZDSIx+WXX+h0AsiXh2OdCIJTmSRP7cyd07LMQKiVQDLKv0Y5Q9BRS 0Lfj81ou4IaoQ== 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 02/27] kconfig: fix off-by-one in zconf_error() Date: Sat, 3 Feb 2024 00:58:00 +0900 Message-Id: <20240202155825.314567-3-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: 1789803573226100110 X-GMAIL-MSGID: 1789803573226100110 |
Series |
kconfig: refactor lexer and parser code
|
|
Commit Message
Masahiro Yamada
Feb. 2, 2024, 3:58 p.m. UTC
yyerror() reports the line number of the next line.
This +1 adjustment was introduced more than 20 years ago [1]. At that
time, the line number was decremented then incremented back and forth.
The line number management was refactored in a more maintainable way.
Such compensation is no longer needed.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=d4f8a4530eb07a1385fd17b0e62a7dce97486f49
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/kconfig/parser.y | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y index 2af7ce4e1531..5ab2e3f7ca33 100644 --- a/scripts/kconfig/parser.y +++ b/scripts/kconfig/parser.y @@ -557,7 +557,7 @@ static void zconf_error(const char *err, ...) static void yyerror(const char *err) { - fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); + fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno(), err); } static void print_quoted_string(FILE *out, const char *str)