linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] kernel-doc: Do not pre-process comments
@ 2024-01-16 15:14 Anna-Maria Behnsen
  2024-01-16 15:14 ` [RFC PATCH 1/2] drm/vram-helper: Fix 'multi-line' kernel-doc comments Anna-Maria Behnsen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Anna-Maria Behnsen @ 2024-01-16 15:14 UTC (permalink / raw)
  To: linux-doc
  Cc: Matthew Wilcox, Jonathan Corbet, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter,
	Anna-Maria Behnsen

Hi,

this is a RFC as I'm not quite sure if this change has some subtle side
effect.

Commit 654784284430 ("kernel-doc: bugfix - multi-line macros") introduces
pre-processing of backslashes at the end of a line to not break multi-line
macros. This pre-processing is done independently if it is inside code or
inside a comment.

This illustation of a hierarchy as a code block inside a kernel-doc comment
has a backslash at the end of the line:

---8<---
/**
 * DOC: hierarchy
 *
 *                    Top Level
 *                /               \
 *         Child A                 Child B
 */
---8<---

It will be displayed as:

---8<---
	     Top Level
	 /                *        Child A                 Child B
---8<---


As I asked for a solution on the linux-doc mailing list, I got some
suggestions with workarounds and also got the suggestion by Matthew Wilcox
to adapt the backslash preprocessing in kernel-doc script. I tested it and
fixed then the newly produced warnings which are covered in the first
patch. The processing of the documentation seems to work - but please don't
rely only on my tests as I'm not a perl neither a kernel-doc expert.

Thanks,

	Anna-Maria



Anna-Maria Behnsen (2):
  drm/vram-helper: Fix 'multi-line' kernel-doc comments
  scripts/kernel-doc: Do not process backslash lines in comments

 drivers/gpu/drm/drm_gem_vram_helper.c | 44 ++++++++++++---------------
 include/drm/drm_gem_vram_helper.h     | 16 +++++-----
 scripts/kernel-doc                    |  2 +-
 3 files changed, 29 insertions(+), 33 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-22  9:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 15:14 [RFC PATCH 0/2] kernel-doc: Do not pre-process comments Anna-Maria Behnsen
2024-01-16 15:14 ` [RFC PATCH 1/2] drm/vram-helper: Fix 'multi-line' kernel-doc comments Anna-Maria Behnsen
2024-01-17  8:47   ` Jani Nikula
2024-01-22  9:13     ` Anna-Maria Behnsen
2024-01-16 15:14 ` [RFC PATCH 2/2] scripts/kernel-doc: Do not process backslash lines in comments Anna-Maria Behnsen
2024-01-16 20:21 ` [RFC PATCH 0/2] kernel-doc: Do not pre-process comments Jonathan Corbet
2024-01-16 21:13   ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).