diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2026-03-18 12:11:05 +0300 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2026-03-23 00:10:40 +0300 |
| commit | 9ab2ca3dd127194a55bd9789c031e800fd19c254 (patch) | |
| tree | 39b96b179068645f4eb72f1d7ca5c119a743a94d /tools/lib/python/kdoc/kdoc_files.py | |
| parent | e0ebee442d56c11df023b7c2d32edc3b0765b2f3 (diff) | |
| download | linux-9ab2ca3dd127194a55bd9789c031e800fd19c254.tar.xz | |
docs: kdoc_files: move output symbols logic to kdoc_output
When writing unittests for kdoc_output, it became clear that
the logic with handles a series of KdocItem symbols from
a single file belons to kdoc_output, and not to kdoc_files.
Move the code to it.
While here, also ensure that self.config will be placed
together with set.out_style.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <4ebc26e37a0b544c50d50b8077760f147fa6a535.1773823995.git.mchehab+huawei@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/kdoc_files.py')
| -rw-r--r-- | tools/lib/python/kdoc/kdoc_files.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tools/lib/python/kdoc/kdoc_files.py b/tools/lib/python/kdoc/kdoc_files.py index 1c5cb9e5f0e8..58f4ee08e226 100644 --- a/tools/lib/python/kdoc/kdoc_files.py +++ b/tools/lib/python/kdoc/kdoc_files.py @@ -269,6 +269,7 @@ class KernelFiles(): # Initialize variables that are internal to KernelFiles self.out_style = out_style + self.out_style.set_config(self.config) self.errors = 0 self.results = {} @@ -311,8 +312,6 @@ class KernelFiles(): returning kernel-doc markups on each interaction. """ - self.out_style.set_config(self.config) - if not filenames: filenames = sorted(self.results.keys()) @@ -336,25 +335,12 @@ class KernelFiles(): function_table, enable_lineno, no_doc_sections) - msg = "" if fname not in self.results: self.config.log.warning("No kernel-doc for file %s", fname) continue symbols = self.results[fname] - self.out_style.set_symbols(symbols) - - for arg in symbols: - m = self.out_msg(fname, arg.name, arg) - - if m is None: - ln = arg.get("ln", 0) - dtype = arg.get('type', "") - - self.config.log.warning("%s:%d Can't handle %s", - fname, ln, dtype) - else: - msg += m + msg = self.out_style.output_symbols(fname, symbols) if msg: yield fname, msg |
