From patchwork Thu Mar 22 17:00:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 132308 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1087668ljb; Thu, 22 Mar 2018 10:01:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELuei27oVDqLnfsukYPuO2sxFJJRi3lCpSxQDK1k2kwOoutGfzFXFgZX2gHF1gOYtYeFWjqB X-Received: by 2002:a17:902:4001:: with SMTP id b1-v6mr3677300pld.273.1521738112680; Thu, 22 Mar 2018 10:01:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521738112; cv=none; d=google.com; s=arc-20160816; b=z0sOuD0vK6oPvkhZiO1F9sKxFOVkV/whYEV0tlkEztIB8VF+z+Ue67oeJvqG4/sqq+ cl73bvt6xATH9+YogiSxqS8EydKmGxYqmh+4cnZ9aiog7bfhbUXr4kWZjRBBJ1Bied37 v4AMR77BYnsj+T6PHLRshfBmX5b6mUsWneZrnny+B6p6feuZ0HdLhLgYoBx4l0KDrA/n E2dATAx6jk3MBxrXpupdNXRaJjZdueTRJPpEP4OE9uR9qbfMAAKH83Vn105lGAAwN4ZM mI0Qy5DbeUQkPRPfXgcJeMM3EY2aQtUdX8v8FVU4boUXDods6+S+qVFPUcEPvvmCwJwp fA8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=6o5EADB16+/r+2A3psEaEYkm6g5BiCsyGcgmSzNLIC8=; b=QHPFCOcA9jHR+YP+CeSUz7OfsLu+q1uV3VhuX2c5pkoqSjUqkRTXYj9JKyMrpICYa1 8WsNIy03gU0J88yHsiouV2HtdIpewyyUxSsNq8tYoIrrcsPinek+cHqpLrMg7rQ3kdMw JzfaJMg+FNMA7ELmOtCtTod3RPyvF6p9dKAInAaInbunhBRRk7d76B99dDW3vnMVdZwe 1invA392U/UzpJEgD0zLqhR93zLfh549H0yE7GV1XJ8pyrjc7FUgSQxVrUScIRK6/3VD rtHxwv5hE0xlOGE4GwrX4TX/sKGTRSEXe64rRhVRgsFVYEYpVir7X6YTpm+CpnButgxZ tOVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=To7dO+eM; 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 t13si4443387pgu.62.2018.03.22.10.01.22; Thu, 22 Mar 2018 10:01:52 -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=To7dO+eM; 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 S1751948AbeCVRBT (ORCPT + 28 others); Thu, 22 Mar 2018 13:01:19 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:47772 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898AbeCVRBQ (ORCPT ); Thu, 22 Mar 2018 13:01:16 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-09.nifty.com with ESMTP id w2MH0Mr2012430; Fri, 23 Mar 2018 02:00:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w2MH0Mr2012430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1521738023; bh=6o5EADB16+/r+2A3psEaEYkm6g5BiCsyGcgmSzNLIC8=; h=From:To:Cc:Subject:Date:From; b=To7dO+eM5igdFZv1Lt53HpwLO3xBf6Nse4kltYV8nLzT/msAs1QPtDWSdEzCQlNGa EQ3GZYZABUb4CHlnegPUXkSXpWn7A6H+9ZY8cwmBJd2Nb337dpQx4ugUcFkoIwmopU Oxe5G/7PBVZO3y2qUSrhIeRr9gcfNhxSft24zHqxnwwcFxtp/20F/+B6folUu6o7pf 1IBtlf0wFyYsMoYZb3g8fP7bGWPz1Bc7eqa4/H+eY76Mdvw1SlkRBUX4MgCISIdqXq TXyYCjPIHRSasmlT39E+f+xo82/5vpTOKNUis0MGwR5hInLkHYdFZtnALdJIK1G36E eRSOG7yi338ug== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Michal Marek , Sam Ravnborg , Ulf Magnusson , "Luis R . Rodriguez" , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] kconfig: remove duplicated file name and lineno of recursive inclusion Date: Fri, 23 Mar 2018 02:00:12 +0900 Message-Id: <1521738014-18895-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As in the unit test, the error message for the recursive inclusion looks like this: Kconfig.inc1:4: recursive inclusion detected. Inclusion path: current file : 'Kconfig.inc1' included from: 'Kconfig.inc3:1' included from: 'Kconfig.inc2:3' included from: 'Kconfig.inc1:4' The 'Kconfig.inc1:4' is duplicated in the first and last lines. Also, the single quotes do not help readability. Change the message like follows: Recursive inclusion detected. Inclusion path: current file : Kconfig.inc1 included from: Kconfig.inc3:1 included from: Kconfig.inc2:3 included from: Kconfig.inc1:4 Signed-off-by: Masahiro Yamada --- scripts/kconfig/tests/err_recursive_inc/expected_stderr | 11 ++++++----- scripts/kconfig/zconf.l | 9 ++++----- 2 files changed, 10 insertions(+), 10 deletions(-) -- 2.7.4 diff --git a/scripts/kconfig/tests/err_recursive_inc/expected_stderr b/scripts/kconfig/tests/err_recursive_inc/expected_stderr index a15dbed..6b582ee 100644 --- a/scripts/kconfig/tests/err_recursive_inc/expected_stderr +++ b/scripts/kconfig/tests/err_recursive_inc/expected_stderr @@ -1,5 +1,6 @@ -Kconfig.inc1:4: recursive inclusion detected. Inclusion path: - current file : 'Kconfig.inc1' - included from: 'Kconfig.inc3:1' - included from: 'Kconfig.inc2:3' - included from: 'Kconfig.inc1:4' +Recursive inclusion detected. +Inclusion path: + current file : Kconfig.inc1 + included from: Kconfig.inc3:1 + included from: Kconfig.inc2:3 + included from: Kconfig.inc1:4 diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 88b650e..6f139d2 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -328,14 +328,13 @@ void zconf_nextfile(const char *name) for (iter = current_file->parent; iter; iter = iter->parent ) { if (!strcmp(current_file->name,iter->name) ) { fprintf(stderr, - "%s:%d: recursive inclusion detected. " - "Inclusion path:\n current file : '%s'\n", - zconf_curname(), zconf_lineno(), - zconf_curname()); + "Recursive inclusion detected.\n" + "Inclusion path:\n" + " current file : %s\n", zconf_curname()); iter = current_file; do { iter = iter->parent; - fprintf(stderr, " included from: '%s:%d'\n", + fprintf(stderr, " included from: %s:%d\n", iter->name, iter->lineno - 1); } while (strcmp(iter->name, current_file->name)); exit(1);