linux-doc: parse kernel-doc deterministically

svn path=/dists/trunk/linux/; revision=22650
This commit is contained in:
Ben Hutchings 2015-05-12 19:36:40 +00:00
parent 9a70d28e7d
commit cbfecc70a4
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,23 @@
From: Jérémy Bobbio <lunar@debian.org>
Date: Wed, 7 Jan 2015 20:49:51 +0100
Subject: parse kernel-doc deterministically
Regular expressions for highlights in kernel-doc are stored in a Perl
hash. These hashes are ordered differently for each Perl run. This will
prevent kernel-doc to behave deterministically when parsing
“@foo()” as in some runs it will be interpreted as a parameter and
in the others it will be interpreted as a function.
We now sort the %highlights hash to get the same behavior on every run.
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2587,7 +2587,7 @@ $kernelversion = get_kernel_version();
# generate a sequence of code that will splice in highlighting information
# using the s// operator.
-foreach my $pattern (keys %highlights) {
+foreach my $pattern (sort keys %highlights) {
# print STDERR "scanning pattern:$pattern, highlight:($highlights{$pattern})\n";
$dohighlight .= "\$contents =~ s:$pattern:$highlights{$pattern}:gs;\n";
}

View File

@ -61,6 +61,7 @@ bugfix/all/rtsx_usb_ms-use-msleep_interruptible-in-polling-loop.patch
bugfix/all/net-mv643xx-disable-tso-by-default.patch
bugfix/all/vfs-read-file_handle-only-once-in-handle_to_path.patch
debian/emmc-don-t-initialize-partitions-on-rpmb-flagged-areas.patch
bugfix/all/make-highlights-deterministic-in-kernel-doc.patch
# Miscellaneous features
features/all/efi-autoload-efi-pstore.patch