Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2367644imu; Thu, 24 Jan 2019 11:30:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN4TYG3J23lQBWK+I33KTKE74t62iq8mMzCTOBxHw72v2WxRX60oFXF3JuPQvResFHO17i1n X-Received: by 2002:a17:902:8306:: with SMTP id bd6mr7879619plb.217.1548358253197; Thu, 24 Jan 2019 11:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548358253; cv=none; d=google.com; s=arc-20160816; b=jIMW68jizKp8V3XR5G9EQ1TjDQsmdTYkaUEbNr/e3bDO3koNBwvvVYSMzw//EFuWmZ 9M1to1kZL491mAeCgK/x0+6E69q2CaqY8gmoFF1zR6N2T7K/OruoXxJ+xRQkKJuqvtxX V+GrUaE3Eb/OgHO4hzURKNOysajivAevnZO6lg3FWH4PSpgsgJtbqWbyWjcjBatE4bp4 0tXkgRqoqKPjHCfN5godusto79jyljRUnqM0o6uwsdCab+mHyxwMfd2lLfNQl1OkSgCH ioztMCSGeGIZ1A68RH3Uzrvl2xg6NNdYuf0TPKJzKSg3Y5bXfEeM2hx7cMHOXBxx9c2c WAqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5XY6cBhpuxdTqfrJ6bo4DR0yCvxGomgM5d+Kl75+llk=; b=xcrKYacnJ8KNjMiSv2ZGdkRCc6s0i6mRNtUFe++NfwuTrkjmQMcl/r3eMCb8u1YtYY AwFwsBo2clxawBiTrr96AXmrpIqXYSVXf2A1OAGz2/cW+na/kdWPjlGMQDmCoF5wxzJr 7foz5B+AD0jdAfkkpIp6e1lbxWRAFFUfxqa2fHM//528AlmKjwLGwH92gXvgI1YJV7YP uF87rPBt1fFOs69IUHYPoLrbnwTzrZt7R0ObFdXuQCeVHXpoUdAd3AWK30scMJBRThjA CRQNLCG+4qld7l5B0xX+FqH5bIAi67VXuN4f9gwQ5YJW8u9Rp8GopRapFg7L5s7o4/Bq itaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KlbQuvuQ; 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 v4si21310775pfm.71.2019.01.24.11.30.38; Thu, 24 Jan 2019 11:30:53 -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=@kernel.org header.s=default header.b=KlbQuvuQ; 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 S1731265AbfAXT3p (ORCPT + 99 others); Thu, 24 Jan 2019 14:29:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:56988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731225AbfAXT3l (ORCPT ); Thu, 24 Jan 2019 14:29:41 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 643A4218FC; Thu, 24 Jan 2019 19:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548358180; bh=70j49iqFRcDaDcBtI+gOwuhJDthZss4k3p1I9hVuJQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KlbQuvuQbfjHhVHD0TXIjmgLqu9usv+2C0qiLTksmquXR7w51cXE2Db/d3axV8lXM 4IlrR8s/gf54y6ozLq/2e9g5CnOCo0Q/zGgwsuoE0rj8vqB+k3yiVZIEG7cgyeEz4/ ArahGtM6ESh0jxs1MNFBkwQIalI2rYiQdNz6hlnQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Sasha Levin Subject: [PATCH 4.9 21/39] kconfig: fix file name and line number of warn_ignored_character() Date: Thu, 24 Jan 2019 20:20:24 +0100 Message-Id: <20190124190448.992143256@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124190448.232316246@linuxfoundation.org> References: <20190124190448.232316246@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 77c1c0fa8b1477c5799bdad65026ea5ff676da44 ] Currently, warn_ignore_character() displays invalid file name and line number. The lexer should use current_file->name and yylineno, while the parser should use zconf_curname() and zconf_lineno(). This difference comes from that the lexer is always going ahead of the parser. The parser needs to look ahead one token to make a shift/reduce decision, so the lexer is requested to scan more text from the input file. This commit fixes the warning message from warn_ignored_character(). [Test Code] ----(Kconfig begin)---- / -----(Kconfig end)----- [Output] Before the fix: :0:warning: ignoring unsupported character '/' After the fix: Kconfig:1:warning: ignoring unsupported character '/' Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/kconfig/zconf.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index c410d257da06..6534dc5ac803 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -71,7 +71,7 @@ static void warn_ignored_character(char chr) { fprintf(stderr, "%s:%d:warning: ignoring unsupported character '%c'\n", - zconf_curname(), zconf_lineno(), chr); + current_file->name, yylineno, chr); } %} -- 2.19.1