docs: kdoc_parser: move transform lists to a separate file

Over the time, most of the changes at kernel-doc are related
to maintaining a list of transforms to convert macros into pure
C code.

Place such transforms on a separate module, to cleanup the
parser module.

There is an advantage on that: QEMU also uses our own kernel-doc,
but the xforms list there is different. By placing it on a
separate module, we can minimize the differences and make it
easier to keep QEMU in sync with Kernel upstream.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <ccd74b7589e1fff340a74bf8ed16a974532cb54f.1772469446.git.mchehab+huawei@kernel.org>
This commit is contained in:
Mauro Carvalho Chehab
2026-03-02 17:40:55 +01:00
committed by Jonathan Corbet
parent 95a9429cc6
commit d842057c4a
4 changed files with 168 additions and 141 deletions

View File

@@ -15,6 +15,7 @@ import os
import re
from kdoc.kdoc_parser import KernelDoc
from kdoc.xforms_lists import CTransforms
from kdoc.kdoc_output import OutputFormat
@@ -117,7 +118,7 @@ class KernelFiles():
if fname in self.files:
return
doc = KernelDoc(self.config, fname)
doc = KernelDoc(self.config, fname, CTransforms())
export_table, entries = doc.parse_kdoc()
self.export_table[fname] = export_table