Skip to content

Commit

Permalink
docs: update kerneldoc.py from linux
Browse files Browse the repository at this point in the history
Update kerneldoc.py from linux kernel, fixing a couple of deprecation
warnings.

Signed-off-by: Klaus Jensen <[email protected]>
  • Loading branch information
birkelund committed Feb 9, 2024
1 parent 9a59231 commit 2e3f832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/sphinx/kerneldoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ def run(self):
result = ViewList()

lineoffset = 0;
line_regex = re.compile("^#define LINENO ([0-9]+)$")
line_regex = re.compile(r"^\.\. LINENO ([0-9]+)$")
for line in lines:
match = line_regex.search(line)
if match:
# sphinx counts lines from 0
lineoffset = int(match.group(1)) - 1
# we must eat our comments since the upset the markup
else:
doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno)
doc = str(env.srcdir) + "/" + env.docname + ":" + str(self.lineno)
result.append(line, doc + ": " + filename, lineoffset)
lineoffset += 1

Expand Down

0 comments on commit 2e3f832

Please sign in to comment.