From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02AA0C282C5 for ; Thu, 24 Jan 2019 20:10:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0747218D0 for ; Thu, 24 Jan 2019 20:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548360617; bh=MhfXbTElip3Mlb6IfB/6V60v77CHQVwn80LKAkYSq30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=T/Gy+i87g0/Ors65h7j8861KME+A7V3nVnUM7h89kxIT2jUlV0+UiLYGuWW8tsJQw 9dn4x8EWV8d15czDwK9l9IiQ5yyh2GyFlneo4XxARd74Zypp+AMsi1B6HJHsxh/lWx d+VwFw5paeYreJJpUpOEWJXiA93cfcekSzdXvmno= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730288AbfAXUKP (ORCPT ); Thu, 24 Jan 2019 15:10:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:54234 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730838AbfAXT1x (ORCPT ); Thu, 24 Jan 2019 14:27:53 -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 33C51218FE; Thu, 24 Jan 2019 19:27:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548358072; bh=MhfXbTElip3Mlb6IfB/6V60v77CHQVwn80LKAkYSq30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UiUlKPGMc5/8H61tRpPsvI+A7+FKGaeOGDbK0fkO8xq0skywmGRpnWtjByXstVIvx gGlHTPjU9SON/q24zYz2d3scxEE7vgRj9755fVWrzc3JhKSvGy5YGTZHTXZ2f1YVrs LlEfTeorNEeph/1SIq5AZ7Iz5iAmJi7TsgMlnqdI= 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.4 089/104] kconfig: fix file name and line number of warn_ignored_character() Date: Thu, 24 Jan 2019 20:20:18 +0100 Message-Id: <20190124190204.737708702@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190124190154.968308875@linuxfoundation.org> References: <20190124190154.968308875@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.4-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