[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201028161030.4e88b297@coco.lan>
Date: Wed, 28 Oct 2020 16:10:30 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
linux-kernel@...r.kernel.org, Jonathan Corbet <corbet@....net>,
Alexandre Torgue <alexandre.torgue@...com>,
Andreas Klinger <ak@...klinger.de>,
Anton Vorontsov <anton@...msg.org>,
Baolin Wang <baolin.wang7@...il.com>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Benson Leung <bleung@...omium.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Boris Brezillon <bbrezillon@...nel.org>,
Chao Yu <chao@...nel.org>,
Chunyan Zhang <zhang.lyra@...il.com>,
Colin Cross <ccross@...roid.com>,
Daniel Thompson <daniel.thompson@...aro.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Fabrice Gasnier <fabrice.gasnier@...com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Jingoo Han <jingoohan1@...il.com>,
Johan Hovold <johan@...nel.org>,
Johannes Berg <johannes@...solutions.net>,
Jonathan Cameron <jic23@...nel.org>,
Kees Cook <keescook@...omium.org>,
Lee Jones <lee.jones@...aro.org>,
Linus Walleij <linus.walleij@...aro.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Ohad Ben-Cohen <ohad@...ery.com>,
Orson Zhai <orsonzhai@...il.com>,
Peter Rosin <peda@...ntia.se>,
Richard Cochran <richardcochran@...il.com>,
Richard Gong <richard.gong@...ux.intel.com>,
Sebastian Reichel <sre@...nel.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Stefan Achatz <erazor_de@...rs.sourceforge.net>,
Tony Luck <tony.luck@...el.com>, Wu Hao <hao.wu@...el.com>
Subject: Re: [PATCH 00/33] ABI: add it to the documentation build system
Em Wed, 28 Oct 2020 15:39:37 +0100
Greg Kroah-Hartman <gregkh@...uxfoundation.org> escreveu:
> On Wed, Oct 28, 2020 at 03:22:58PM +0100, Mauro Carvalho Chehab wrote:
> > Hi Greg,
> >
> > As requested, this is a rebased version on the top of v5.10-rc1
> > adding support for having the Linux ABI documentted inside
> > the Linux admin manual.
> >
> > When compared with the version I sent years ago, this
> > version has:
> >
> > - a logic to detect duplicated ABI symbols;
> > - it auto-generate cross-reference markups for ABI symbols,
> > ABI files and .rst files;
> > - Other files from 5.10-rc1 required adjustments in order
> > to be accepted by the script in rst-source mode;
> > - Some bug fixes.
> >
> > PS.: I didn't try to merge it against linux-next yet. So,
> > I won't doubt that applying it could cause some conflicts.
> >
> > Feel free to review it.
>
> After applying the first 10 patches, and running it, I see a bunch of
> these types of warnings:
>
> Use of uninitialized value $kernelversion in substitution (s///) at ./scripts/get_abi.pl line 444.
> Use of uninitialized value $users in substitution (s///) at ./scripts/get_abi.pl line 446.
> Use of uninitialized value $users in substitution (s///) at ./scripts/get_abi.pl line 447.
Hmm.. I didn't test search after adding "use warnings".
The thing is that "use warnings" was added on one of get_abi.pl
patches, just to be sure that some ABI parsers were 100%.
That makes perl very pedantic, as it won't accept things like:
my $foo;
...
my $bar = $foo;
Without "warnings", $bar will be undefined, and everything
works properly, but, when this used, the above will still
work properly, but will start producing warnings like the
one you're seeing.
I'm enclosing a diff addressing it for "search" mode.
It should be fold on this patch:
scripts: get_abi.pl: cleanup ABI cross-reference logic
Which is the one that added "use warnings".
Feel free to fold it there. Otherwise, I'll fold it and
send you on a v2 of this series.
>
> When doing something like:
> $ ./scripts/get_abi.pl search usb --dir Documentation/ABI/stable/
>
> Is that expected?
>
> thanks,
>
> greg k-h
Thanks,
Mauro
diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
index bdef3e5c35c7..00b6ddec0ebb 100755
--- a/scripts/get_abi.pl
+++ b/scripts/get_abi.pl
@@ -442,17 +442,20 @@ sub search_symbols {
print "\n$what\n$bar\n\n";
- my $kernelversion = $data{$what}->{kernelversion};
- my $contact = $data{$what}->{contact};
- my $users = $data{$what}->{users};
- my $date = $data{$what}->{date};
- my $desc = $data{$what}->{description};
- $kernelversion =~ s/^\s+//;
- $contact =~ s/^\s+//;
- $users =~ s/^\s+//;
- $users =~ s/\n//g;
- $date =~ s/^\s+//;
- $desc =~ s/^\s+//;
+ my $kernelversion = $data{$what}->{kernelversion} if (defined($data{$what}->{kernelversion}));
+ my $contact = $data{$what}->{contact} if (defined($data{$what}->{contact}));
+ my $users = $data{$what}->{users} if (defined($data{$what}->{users}));
+ my $date = $data{$what}->{date} if (defined($data{$what}->{date}));
+ my $desc = $data{$what}->{description} if (defined($data{$what}->{description}));
+
+ $kernelversion =~ s/^\s+// if ($kernelversion);
+ $contact =~ s/^\s+// if ($contact);
+ if ($users) {
+ $users =~ s/^\s+//;
+ $users =~ s/\n//g;
+ }
+ $date =~ s/^\s+// if ($date);
+ $desc =~ s/^\s+// if ($desc);
printf "Kernel version:\t\t%s\n", $kernelversion if ($kernelversion);
printf "Date:\t\t\t%s\n", $date if ($date);
Powered by blists - more mailing lists