mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 02:36:21 +00:00
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
This commit is contained in:
parent
a3a23d360c
commit
e8ebb853eb
@ -820,7 +820,6 @@ sub output_function_rst(%) {
|
|||||||
my %args = %{$_[0]};
|
my %args = %{$_[0]};
|
||||||
my ($parameter, $section);
|
my ($parameter, $section);
|
||||||
my $oldprefix = $lineprefix;
|
my $oldprefix = $lineprefix;
|
||||||
my $start = "";
|
|
||||||
my $is_macro = 0;
|
my $is_macro = 0;
|
||||||
|
|
||||||
if ($sphinx_major < 3) {
|
if ($sphinx_major < 3) {
|
||||||
@ -830,7 +829,7 @@ sub output_function_rst(%) {
|
|||||||
print " **Typedef**: ";
|
print " **Typedef**: ";
|
||||||
$lineprefix = "";
|
$lineprefix = "";
|
||||||
output_highlight_rst($args{'purpose'});
|
output_highlight_rst($args{'purpose'});
|
||||||
$start = "\n\n**Syntax**\n\n ``";
|
print "\n\n**Syntax**\n\n ``";
|
||||||
$is_macro = 1;
|
$is_macro = 1;
|
||||||
} else {
|
} else {
|
||||||
print ".. c:function:: ";
|
print ".. c:function:: ";
|
||||||
@ -848,17 +847,16 @@ sub output_function_rst(%) {
|
|||||||
print " **Typedef**: ";
|
print " **Typedef**: ";
|
||||||
$lineprefix = "";
|
$lineprefix = "";
|
||||||
output_highlight_rst($args{'purpose'});
|
output_highlight_rst($args{'purpose'});
|
||||||
$start = "\n\n**Syntax**\n\n ``";
|
print "\n\n**Syntax**\n\n ``";
|
||||||
} else {
|
} else {
|
||||||
print "``" if ($is_macro);
|
print "``" if ($is_macro);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($args{'functiontype'} ne "") {
|
if ($args{'functiontype'} ne "") {
|
||||||
$start .= $args{'functiontype'} . " " . $args{'function'} . " (";
|
print $args{'functiontype'} . " " . $args{'function'} . " (";
|
||||||
} else {
|
} else {
|
||||||
$start .= $args{'function'} . " (";
|
print $args{'function'} . " (";
|
||||||
}
|
}
|
||||||
print $start;
|
|
||||||
|
|
||||||
my $count = 0;
|
my $count = 0;
|
||||||
foreach my $parameter (@{$args{'parameterlist'}}) {
|
foreach my $parameter (@{$args{'parameterlist'}}) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user