summaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@oracle.com>2024-02-15 14:48:25 +0100
committerJonathan Corbet <corbet@lwn.net>2024-02-21 13:44:21 -0700
commite8ebb853eb5751168cfd87c706fb1c38e053d4fb (patch)
treee88dcf9c1fd8220ff853e1e2b15d6f51cfb06fcf /scripts/kernel-doc
parenta3a23d360cdd853b1038deda05e8d8c134a49a90 (diff)
downloadlinux-stable-e8ebb853eb5751168cfd87c706fb1c38e053d4fb.tar.gz
linux-stable-e8ebb853eb5751168cfd87c706fb1c38e053d4fb.tar.bz2
linux-stable-e8ebb853eb5751168cfd87c706fb1c38e053d4fb.zip
scripts/kernel-doc: simplify function printing
Get rid of the $start variable, since it's really not necessary. No functional change. Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20240215134828.1277109-3-vegard.nossum@oracle.com
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 4dc5c3909d8c..9b7441e77669 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -820,7 +820,6 @@ sub output_function_rst(%) {
my %args = %{$_[0]};
my ($parameter, $section);
my $oldprefix = $lineprefix;
- my $start = "";
my $is_macro = 0;
if ($sphinx_major < 3) {
@@ -830,7 +829,7 @@ sub output_function_rst(%) {
print " **Typedef**: ";
$lineprefix = "";
output_highlight_rst($args{'purpose'});
- $start = "\n\n**Syntax**\n\n ``";
+ print "\n\n**Syntax**\n\n ``";
$is_macro = 1;
} else {
print ".. c:function:: ";
@@ -848,17 +847,16 @@ sub output_function_rst(%) {
print " **Typedef**: ";
$lineprefix = "";
output_highlight_rst($args{'purpose'});
- $start = "\n\n**Syntax**\n\n ``";
+ print "\n\n**Syntax**\n\n ``";
} else {
print "``" if ($is_macro);
}
}
if ($args{'functiontype'} ne "") {
- $start .= $args{'functiontype'} . " " . $args{'function'} . " (";
+ print $args{'functiontype'} . " " . $args{'function'} . " (";
} else {
- $start .= $args{'function'} . " (";
+ print $args{'function'} . " (";
}
- print $start;
my $count = 0;
foreach my $parameter (@{$args{'parameterlist'}}) {