Mauro Carvalho Chehab
245f1ab2c9
docs: kdoc_output: Improve docstrings and comments
...
In preparation to document kernel-doc module, improve its
documentation.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org >
Signed-off-by: Jonathan Corbet <corbet@lwn.net >
Message-ID: <ac03bf776f0929bbe822cd8269f2a31e275b8d6b.1768838938.git.mchehab+huawei@kernel.org >
2026-01-23 11:37:38 -07:00
Mauro Carvalho Chehab
bdd1cf8784
kernel-doc: add support to handle DEFINE_ variables
...
Improve the parser and output plugin to work with macros,
adding support for the common pattern of using DEFINE_*
to create variables.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org >
Signed-off-by: Jonathan Corbet <corbet@lwn.net >
Message-ID: <757a45100cfc493984574ff780aa9d90506eecb4.1765894964.git.mchehab+huawei@kernel.org >
2025-12-22 14:43:25 -07:00
Mauro Carvalho Chehab
1045ec382c
kernel-doc: add support for handling global variables
...
Specially on kAPI, sometimes it is desirable to be able to
describe global variables that are part of kAPI.
Documenting vars with Sphinx is simple, as we don't need
to parse a data struct. All we need is the variable
declaration and use native C domain ::c:var: to format it
for us.
Add support for it.
Link: https://lore.kernel.org/linux-doc/491c3022-cef8-4860-a945-c9c4a3b63c09@infradead.org/T/#m947c25d95cb1d96a394410ab1131dc8e9e5013f1
Suggested-by: Randy Dunlap <rdunlap@infradead.org >
Tested-by: Randy Dunlap <rdunlap@infradead.org >
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org >
Signed-off-by: Jonathan Corbet <corbet@lwn.net >
Message-ID: <fa7d1c61a8de9150f71b318382f1507d3b13848d.1765894964.git.mchehab+huawei@kernel.org >
2025-12-22 14:43:25 -07:00
Randy Dunlap
5f88f44d84
docs: kdoc: various fixes for grammar, spelling, punctuation
...
Correct grammar, spelling, and punctuation in comments, strings,
print messages, logs.
Change two instances of two spaces between words to just one space.
codespell was used to find misspelled words.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: linux-doc@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org >
Signed-off-by: Jonathan Corbet <corbet@lwn.net >
Message-ID: <20251124041011.3030571-1-rdunlap@infradead.org >
2025-11-29 08:35:23 -07:00
Jonathan Corbet
992a9df41a
docs: bring some order to our Python module hierarchy
...
Now that we have tools/lib/python for our Python modules, turn them into
proper packages with a single namespace so that everything can just use
tools/lib/python in sys.path. No functional change.
Signed-off-by: Jonathan Corbet <corbet@lwn.net >
Message-ID: <20251110220430.726665-3-corbet@lwn.net >
2025-11-18 09:22:40 -07:00
Jonathan Corbet
778b8ebe51
docs: Move the python libraries to tools/lib/python
...
"scripts/lib" was always a bit of an awkward place for Python modules. We
already have tools/lib; create a tools/lib/python, move the libraries
there, and update the users accordingly.
While at it, move the contents of tools/docs/lib. Rather than make another
directory, just put these documentation-oriented modules under "kdoc".
Signed-off-by: Jonathan Corbet <corbet@lwn.net >
Message-ID: <20251110220430.726665-2-corbet@lwn.net >
2025-11-18 09:22:40 -07:00