Skip to content

Commit b79dfef

Browse files
mchehabJonathan Corbet
authored andcommitted
scripts/kernel-doc: change the line number meta info
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 <mchehab@kernel.org> Link: https://lore.kernel.org/r/40725032b5a4a33db740bf1de397523af958ff8a.1648290305.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 92b6de1 commit b79dfef

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Documentation/sphinx/kerneldoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def run(self):
130130
result = ViewList()
131131

132132
lineoffset = 0;
133-
line_regex = re.compile("^#define LINENO ([0-9]+)$")
133+
line_regex = re.compile("^\.\. LINENO ([0-9]+)$")
134134
for line in lines:
135135
match = line_regex.search(line)
136136
if match:

scripts/kernel-doc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ sub get_kernel_version() {
424424
sub print_lineno {
425425
my $lineno = shift;
426426
if ($enable_lineno && defined($lineno)) {
427-
print "#define LINENO " . $lineno . "\n";
427+
print ".. LINENO " . $lineno . "\n";
428428
}
429429
}
430430
##
@@ -2478,7 +2478,7 @@ May be specified multiple times.
24782478
24792479
=item -enable-lineno
24802480
2481-
Enable output of #define LINENO lines.
2481+
Enable output of .. LINENO lines.
24822482
24832483
=back
24842484

0 commit comments

Comments
 (0)