2016-05-18 23:30:30 +03:00
|
|
|
|
2025-06-22 11:39:53 +02:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-31 18:09:12 +03:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
2017-08-31 22:21:29 +03:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc/sphinx: Track line-number of starting blocks
Design is pretty simple: kernel-doc inserts breadcrumbs with line
numbers, and sphinx picks them up. At first I went with a sphinx
comment, but inserting those at random places seriously upsets the
parser, and must be filtered. Hence why this version now uses "#define
LINEO " since one of these ever escape into output it's pretty clear
there is a bug.
It seems to work well, and at least the 2-3 errors where sphinx
complained about something that was not correct in kernel-doc text the
line numbers matched up perfectly.
v2: Instead of noodling around in the parser state machine, create
a ViewList and parse it ourselves. This seems to be the recommended
way, per Jani's suggestion.
v3:
- Split out ViewList pach. Splitting the kernel-doc changes from the
sphinx ones isn't possible, since emitting the LINENO lines wreaks
havoc with the rst formatting. We must filter them.
- Improve the regex per Jani's suggestions, and compile it just once
for speed.
- Now that LINENO lines are eaten, also add them to function parameter
descriptions. Much less content and offset than for in-line struct
member descriptions, but still nice to know which exact continuation
line upsets sphinx.
- Simplify/clarify the line +/-1 business a bit.
v4: Split out the scripts/kernel-doc changes and make line-numbers
opt-in, as suggested by Jani.
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: linux-doc@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-03 22:21:35 +02:00
|
|
|
|
2016-06-07 12:13:56 +03:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
2016-06-02 14:59:18 +02:00
|
|
|
|
2018-03-02 10:40:14 -08:00
|
|
|
|
2019-05-21 14:42:34 -06:00
|
|
|
|
2021-02-01 16:26:25 -07:00
|
|
|
|
2025-02-10 11:17:50 +01:00
|
|
|
|
2025-05-21 11:02:14 +02:00
|
|
|
|
2019-05-21 14:23:43 -06:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2025-11-10 15:04:30 -07:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2025-11-10 15:04:30 -07:00
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2026-01-19 13:05:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-24 15:35:24 +02:00
|
|
|
|
2025-04-25 15:13:38 +08:00
|
|
|
|
2025-05-21 11:02:14 +02:00
|
|
|
|
2016-08-24 15:35:24 +02:00
|
|
|
|
2025-04-08 18:09:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-07 12:13:56 +03:00
|
|
|
|
|
|
|
|
|
2019-10-31 21:52:45 +08:00
|
|
|
|
2020-09-29 11:32:18 +02:00
|
|
|
|
2019-10-31 21:52:45 +08:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
2025-04-08 18:09:22 +08:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
2026-01-19 13:05:04 +01:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-07 12:13:56 +03:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
2025-04-08 18:09:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
2019-10-31 21:52:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2016-06-07 12:13:56 +03:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2016-06-07 12:13:56 +03:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-31 21:52:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-08 18:09:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-31 21:52:45 +08:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2018-06-30 00:05:10 +03:00
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
2020-09-29 11:32:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-08 18:09:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-29 11:32:18 +02:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2020-09-29 11:32:18 +02:00
|
|
|
|
2016-06-07 12:13:56 +03:00
|
|
|
|
2025-04-08 18:09:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-07 12:13:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-07 12:13:56 +03:00
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
2026-01-19 13:05:00 +01:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-21 11:02:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc/sphinx: Track line-number of starting blocks
Design is pretty simple: kernel-doc inserts breadcrumbs with line
numbers, and sphinx picks them up. At first I went with a sphinx
comment, but inserting those at random places seriously upsets the
parser, and must be filtered. Hence why this version now uses "#define
LINEO " since one of these ever escape into output it's pretty clear
there is a bug.
It seems to work well, and at least the 2-3 errors where sphinx
complained about something that was not correct in kernel-doc text the
line numbers matched up perfectly.
v2: Instead of noodling around in the parser state machine, create
a ViewList and parse it ourselves. This seems to be the recommended
way, per Jani's suggestion.
v3:
- Split out ViewList pach. Splitting the kernel-doc changes from the
sphinx ones isn't possible, since emitting the LINENO lines wreaks
havoc with the rst formatting. We must filter them.
- Improve the regex per Jani's suggestions, and compile it just once
for speed.
- Now that LINENO lines are eaten, also add them to function parameter
descriptions. Much less content and offset than for in-line struct
member descriptions, but still nice to know which exact continuation
line upsets sphinx.
- Simplify/clarify the line +/-1 business a bit.
v4: Split out the scripts/kernel-doc changes and make line-numbers
opt-in, as suggested by Jani.
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: linux-doc@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-06-03 22:21:35 +02:00
|
|
|
|
2025-05-21 11:02:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-02 14:59:18 +02:00
|
|
|
|
2025-05-21 11:02:14 +02:00
|
|
|
|
2016-06-02 14:59:18 +02:00
|
|
|
|
2026-01-19 13:05:00 +01:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-19 13:05:00 +01:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-21 11:02:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-19 13:05:00 +01:00
|
|
|
|
2025-05-21 11:02:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2019-05-21 14:42:34 -06:00
|
|
|
|
2021-02-01 16:26:25 -07:00
|
|
|
|
|
|
|
|
|
2019-05-21 14:42:34 -06:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
2025-04-25 15:13:38 +08:00
|
|
|
|
2026-01-19 13:05:00 +01:00
|
|
|
|
|
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
2016-05-18 23:30:30 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-24 15:35:24 +02:00
|
|
|
|
2025-04-15 11:12:51 +08:00
|
|
|
|
|
|
|
|
|
2016-08-24 15:35:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|