diff options
author | Borislav Petkov <bbpetkov@yahoo.de> | 2007-05-09 11:33:43 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 21:30:50 +0200 |
commit | 0366299bd2de283091f4394c0f446e58b5f94815 (patch) | |
tree | 731f06faa6ed4b93da3c45a78a13683e55c9503b /scripts | |
parent | doc: what a patch series is (diff) | |
download | linux-0366299bd2de283091f4394c0f446e58b5f94815.tar.xz linux-0366299bd2de283091f4394c0f446e58b5f94815.zip |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kernel-doc | 7 |
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() { } return $version; } +my $kernelversion = get_kernel_version(); # generate a sequence of code that will splice in highlighting information # using the s// operator. @@ -610,7 +611,7 @@ sub output_function_xml(%) { print "<refmeta>\n"; print " <refentrytitle><phrase>".$args{'function'}."</phrase></refentrytitle>\n"; print " <manvolnum>9</manvolnum>\n"; - print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; + print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n"; print "</refmeta>\n"; print "<refnamediv>\n"; print " <refname>".$args{'function'}."</refname>\n"; @@ -687,7 +688,7 @@ sub output_struct_xml(%) { print "<refmeta>\n"; print " <refentrytitle><phrase>".$args{'type'}." ".$args{'struct'}."</phrase></refentrytitle>\n"; print " <manvolnum>9</manvolnum>\n"; - print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; + print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n"; print "</refmeta>\n"; print "<refnamediv>\n"; print " <refname>".$args{'type'}." ".$args{'struct'}."</refname>\n"; @@ -772,7 +773,7 @@ sub output_enum_xml(%) { print "<refmeta>\n"; print " <refentrytitle><phrase>enum ".$args{'enum'}."</phrase></refentrytitle>\n"; print " <manvolnum>9</manvolnum>\n"; - print " <refmiscinfo class=\"version\">" . get_kernel_version() . "</refmiscinfo>\n"; + print " <refmiscinfo class=\"version\">" . $kernelversion . "</refmiscinfo>\n"; print "</refmeta>\n"; print "<refnamediv>\n"; print " <refname>enum ".$args{'enum'}."</refname>\n"; |