From: Borislav Petkov Date: Wed, 9 May 2007 09:33:43 +0000 (-0700) Subject: kernel-doc: small kernel-doc optimization X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0366299bd2de283091f4394c0f446e58b5f94815;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 "\n"; print " ".$args{'function'}."\n"; print " 9\n"; - print " " . get_kernel_version() . "\n"; + print " " . $kernelversion . "\n"; print "\n"; print "\n"; print " ".$args{'function'}."\n"; @@ -687,7 +688,7 @@ sub output_struct_xml(%) { print "\n"; print " ".$args{'type'}." ".$args{'struct'}."\n"; print " 9\n"; - print " " . get_kernel_version() . "\n"; + print " " . $kernelversion . "\n"; print "\n"; print "\n"; print " ".$args{'type'}." ".$args{'struct'}."\n"; @@ -772,7 +773,7 @@ sub output_enum_xml(%) { print "\n"; print " enum ".$args{'enum'}."\n"; print " 9\n"; - print " " . get_kernel_version() . "\n"; + print " " . $kernelversion . "\n"; print "\n"; print "\n"; print " enum ".$args{'enum'}."\n";