diff options
author | Borislav Petkov <bbpetkov@yahoo.de> | 2007-05-09 02:33:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 12:30:50 -0700 |
commit | 0366299bd2de283091f4394c0f446e58b5f94815 (patch) | |
tree | 731f06faa6ed4b93da3c45a78a13683e55c9503b /scripts | |
parent | 66effdc6a6a79c11f1c0d607d0de299108d69507 (diff) | |
download | op-kernel-dev-0366299bd2de283091f4394c0f446e58b5f94815.zip op-kernel-dev-0366299bd2de283091f4394c0f446e58b5f94815.tar.gz |
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 a325a0c..e5bf649 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"; |