aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Petkov <bbpetkov@yahoo.de>2007-05-09 05:33:43 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:50 -0400
commit0366299bd2de283091f4394c0f446e58b5f94815 (patch)
tree731f06faa6ed4b93da3c45a78a13683e55c9503b
parent66effdc6a6a79c11f1c0d607d0de299108d69507 (diff)
kernel-doc: small kernel-doc optimization
Get the kernel version string only once from the environment, thus slightly speeding up kernel-doc. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rwxr-xr-xscripts/kernel-doc7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index a325a0c890dc..e5bf649e516a 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -337,6 +337,7 @@ sub get_kernel_version() {
337 } 337 }
338 return $version; 338 return $version;
339} 339}
340my $kernelversion = get_kernel_version();
340 341
341# generate a sequence of code that will splice in highlighting information 342# generate a sequence of code that will splice in highlighting information
342# using the s// operator. 343# using the s// operator.
@@ -610,7 +611,7 @@ sub output_function_xml(%) {
610 print "<refmeta>\n"; 611 print "<refmeta>\n";
611 print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n"; 612 print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n";
612 print " <manvolnum>9</manvolnum>\n"; 613 print " <manvolnum>9</manvolnum>\n";
613 print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; 614 print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n";
614 print "</refmeta>\n"; 615 print "</refmeta>\n";
615 print "<refnamediv>\n"; 616 print "<refnamediv>\n";
616 print " <refname>".$args{'function'}."</refname>\n"; 617 print " <refname>".$args{'function'}."</refname>\n";
@@ -687,7 +688,7 @@ sub output_struct_xml(%) {
687 print "<refmeta>\n"; 688 print "<refmeta>\n";
688 print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n"; 689 print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n";
689 print " <manvolnum>9</manvolnum>\n"; 690 print " <manvolnum>9</manvolnum>\n";
690 print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; 691 print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n";
691 print "</refmeta>\n"; 692 print "</refmeta>\n";
692 print "<refnamediv>\n"; 693 print "<refnamediv>\n";
693 print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n"; 694 print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n";
@@ -772,7 +773,7 @@ sub output_enum_xml(%) {
772 print "<refmeta>\n"; 773 print "<refmeta>\n";
773 print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n"; 774 print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n";
774 print " <manvolnum>9</manvolnum>\n"; 775 print " <manvolnum>9</manvolnum>\n";
775 print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; 776 print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n";
776 print "</refmeta>\n"; 777 print "</refmeta>\n";
777 print "<refnamediv>\n"; 778 print "<refnamediv>\n";
778 print " <refname>enum ".$args{'enum'}."</refname>\n"; 779 print " <refname>enum ".$args{'enum'}."</refname>\n";