Skip to content

Commit

Permalink
scripts/kernel-doc: change the line number meta info
Browse files Browse the repository at this point in the history
In order to make it more standard and ReST compatible,
change the meta-tag used with --enable-lineno from:

        #define LINENO

to
        .. LINENO

In practice, no	functional changes.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Link: https://lore.kernel.org/r/40725032b5a4a33db740bf1de397523af958ff8a.1648290305.git.mchehab@kernel.org
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
mchehab authored and Jonathan Corbet committed Mar 28, 2022
1 parent 92b6de1 commit b79dfef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/sphinx/kerneldoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def run(self):
result = ViewList()

lineoffset = 0;
line_regex = re.compile("^#define LINENO ([0-9]+)$")
line_regex = re.compile("^\.\. LINENO ([0-9]+)$")
for line in lines:
match = line_regex.search(line)
if match:
Expand Down
4 changes: 2 additions & 2 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ sub get_kernel_version() {
sub print_lineno {
my $lineno = shift;
if ($enable_lineno && defined($lineno)) {
print "#define LINENO " . $lineno . "\n";
print ".. LINENO " . $lineno . "\n";
}
}
##
Expand Down Expand Up @@ -2478,7 +2478,7 @@ May be specified multiple times.
=item -enable-lineno
Enable output of #define LINENO lines.
Enable output of .. LINENO lines.
=back
Expand Down

0 comments on commit b79dfef

Please sign in to comment.