Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3974268pxb; Mon, 27 Sep 2021 06:51:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtujoLbUiZxd/5AuUcNw2WpKqhKhWhTNmHlfolF9vfgkQz5oEL1/PMjSyEicaiNNaBDovF X-Received: by 2002:a63:b552:: with SMTP id u18mr16222746pgo.223.1632750664962; Mon, 27 Sep 2021 06:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632750664; cv=none; d=google.com; s=arc-20160816; b=WVOdLwS90zn0O7pMsovNFwI5OcRMz5FBDCaNi2/89OO9S6px4age1JdOj5z9qDAPdn mBZ8UA9NlNgxi1rIi0fi9iCnBINnTIEVZUpm8YUXL7/hwAcTjog4sj7Ml975MvvSUAS5 XxCYbXgkfxUvE5FI/O5RYWSgyywZCqnDzBJvUkOZMlCZndrJGsjfWjs5K7qGazeSoUee NEQwwKOZ96eWn5RxHMIVNIF2TWTJ9P8uXk2KrwexKv0lxIe8TrjNe4UKQn66E5Z7YRDG SNCCrnRWBCpPJl3USeoJGID6sFrp7+wsboRKS6y8FmBkA3uDA/vtZBTyjkz46PtEzS+5 jweA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dBGCD9aE4wqHzt65fIhLV8074JhMHn03tryG1Wt/BNA=; b=Wc1LS/c4uwVOVnQzWbwXxS74ZZLJYKDR7SJv/ctx+zdd/qPIskaiHNJN9Hkl0fRi2y TQJPiAOmjcCLeoZDgwBGTbZV0o8hH5kwfLBWAkJvfMTwlJ1782Dr0ux0uV5EC3/NH8wF rAMnJNCdV5cXD8XIRs9rbr9gQnyH7g/qt0pFKMsqUKi6NSglpId6q/L9TlmHgWkt1MJZ Pp1LJ7+xIYdin3FeF/S7gA24k+4IjtW3cS0q57IJSIx65F6nVq53t1+cf+P+71cFAXTZ djrO6PuavDvWJCRXH7/w5j/Hkk9o6Ij3szFyeXR7iHAge6GkGYv260DQxV8XglDIvhl8 C+/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C2sAeA6e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si22898421pgb.298.2021.09.27.06.50.52; Mon, 27 Sep 2021 06:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C2sAeA6e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234637AbhI0Nvh (ORCPT + 99 others); Mon, 27 Sep 2021 09:51:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:41818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234583AbhI0Nvd (ORCPT ); Mon, 27 Sep 2021 09:51:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E52360F39; Mon, 27 Sep 2021 13:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632750595; bh=/bOTaTmzGWeOrx1NvxdBUUcp7sjpew/tVp0sOd6hnug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C2sAeA6eryJvSq866rse+8FBL6cA6CkUy9+hm51NPBXQUtNU6PM2Yz8P+zjwG88iV OjipCFk3ZisQEFdyW3/x/VT5xyu4/9m670olcer6izeYdSKnpD1R1JIRS+lkmQCXUC wZapp0mWJJ60RDHDPV6BEH2eRpvRY4QyNMTOiZNh0Ikg8FtGimLO3c0T8aB3ttfCJm OhXp1+vPQh571NkbJq9R7TmZLvy5tIagTvJNXVNpzr0Gz7s21f0j1C3aNDQmwOYwLY ntUoF1AeCeB8/tPvEppPl7OCv2G305A2btJRKeC50Lpphvsh4yL1LlToYDha+3j/Kf Im891uej+k0Yg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mUr0z-000AjU-JN; Mon, 27 Sep 2021 15:49:53 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Greg Kroah-Hartman Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] scripts: get_abi.pl: produce an error if the ref tree is broken Date: Mon, 27 Sep 2021 15:49:49 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The logic under graph_add_file should create, for every entry, a __name name array for all entries of the tree. If this fails, the symlink parsing will break. Add an error if this ever happens. While here, improve the output of data dumper to be more compact and to avoid displaying things like $VAR1=. Signed-off-by: Mauro Carvalho Chehab --- See [PATCH 0/3] at: https://lore.kernel.org/all/cover.1632750315.git.mchehab+huawei@kernel.org/ scripts/get_abi.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl index c191c024f052..26a3f8ff566a 100755 --- a/scripts/get_abi.pl +++ b/scripts/get_abi.pl @@ -27,6 +27,9 @@ my $dbg_what_open = 2; my $dbg_dump_abi_structs = 4; my $dbg_undefined = 8; +$Data::Dumper::Indent = 1; +$Data::Dumper::Terse = 1; + # # If true, assumes that the description is formatted with ReST # @@ -597,7 +600,6 @@ sub graph_add_link { my @queue; my %seen; - my $base_name; my $st; push @queue, $file_ref; @@ -611,6 +613,12 @@ sub graph_add_link { next if $seen{$$v{$c}}; next if ($c eq "__name"); + if (!defined($$v{$c}{"__name"})) { + printf STDERR "Error: Couldn't find a non-empty name on a children of $file/.*: "; + print STDERR Dumper(%{$v}); + exit; + } + # Add new name my $name = @{$$v{$c}{"__name"}}[0]; if ($name =~ s#^$file/#$link/#) { -- 2.31.1