From cbfecc70a410b05575837369e18dbf829ffe0021 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 12 May 2015 19:36:40 +0000 Subject: [PATCH] linux-doc: parse kernel-doc deterministically svn path=/dists/trunk/linux/; revision=22650 --- ...ghlights-deterministic-in-kernel-doc.patch | 23 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 24 insertions(+) create mode 100644 debian/patches/bugfix/all/make-highlights-deterministic-in-kernel-doc.patch diff --git a/debian/patches/bugfix/all/make-highlights-deterministic-in-kernel-doc.patch b/debian/patches/bugfix/all/make-highlights-deterministic-in-kernel-doc.patch new file mode 100644 index 000000000..71b4e9198 --- /dev/null +++ b/debian/patches/bugfix/all/make-highlights-deterministic-in-kernel-doc.patch @@ -0,0 +1,23 @@ +From: Jérémy Bobbio +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"; + } diff --git a/debian/patches/series b/debian/patches/series index 4696d6342..607cde557 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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