[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 23/34] modules: module.h kerneldoc annotations
From: |
Gerd Hoffmann |
Subject: |
[PATCH v4 23/34] modules: module.h kerneldoc annotations |
Date: |
Thu, 24 Jun 2021 12:38:25 +0200 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/qemu/module.h | 59 +++++++++++++++++++++++++++++++++----------
1 file changed, 45 insertions(+), 14 deletions(-)
diff --git a/include/qemu/module.h b/include/qemu/module.h
index 7f4b1af8198c..8bc80535a4d4 100644
--- a/include/qemu/module.h
+++ b/include/qemu/module.h
@@ -74,11 +74,18 @@ void module_load_qom_one(const char *type);
void module_load_qom_all(void);
void module_allow_arch(const char *arch);
-/*
- * module info annotation macros
+/**
+ * DOC: module info annotation macros
*
- * scripts/modinfo-collect.py will collect module info,
- * using the preprocessor and -DQEMU_MODINFO
+ * `scripts/modinfo-collect.py` will collect module info,
+ * using the preprocessor and -DQEMU_MODINFO.
+ *
+ * `scripts/modinfo-generate.py` will create a module meta-data database
+ * from the collected information so qemu knows about module
+ * dependencies and QOM objects implemented by modules.
+ *
+ * See `*.modinfo` and `modinfo.c` in the build directory to check the
+ * script results.
*/
#ifdef QEMU_MODINFO
# define modinfo(kind, value) \
@@ -87,24 +94,48 @@ void module_allow_arch(const char *arch);
# define modinfo(kind, value)
#endif
-/* module implements QOM type <name> */
+/**
+ * module_obj
+ *
+ * @name: QOM type.
+ *
+ * This module implements QOM type @name.
+ */
#define module_obj(name) modinfo(obj, name)
-/* module has a dependency on <name> */
+/**
+ * module_dep
+ *
+ * @name: module name
+ *
+ * This module depends on module @name.
+ */
#define module_dep(name) modinfo(dep, name)
-/* module is for target architecture <name> */
+/**
+ * module_arch
+ *
+ * @arch: target architecture
+ *
+ * This module is for target architecture @arch.
+ *
+ * Note that target-dependent modules are tagged automatically, so
+ * this is only needed in case target-independent modules should be
+ * restricted. Use case example: the ccw bus is implemented by s390x
+ * only.
+ */
#define module_arch(name) modinfo(arch, name)
-/* module registers QemuOpts <name> */
+/**
+ * module_opts
+ *
+ * @name: QemuOpts name
+ *
+ * This module registers QemuOpts @name.
+ */
#define module_opts(name) modinfo(opts, name)
-/*
- * module info database
- *
- * scripts/modinfo-generate.c will build this using the data collected
- * by scripts/modinfo-collect.py
- */
+/* module info database (created by scripts/modinfo-generate.py) */
typedef struct QemuModinfo QemuModinfo;
struct QemuModinfo {
const char *name;
--
2.31.1
- [PATCH v4 11/34] modules: add ui module annotations, (continued)
- [PATCH v4 11/34] modules: add ui module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 12/34] modules: add s390x module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 13/34] modules: add block module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 14/34] modules: use modinfo for dependencies, Gerd Hoffmann, 2021/06/24
- [PATCH v4 15/34] modules: use modinfo for qom load, Gerd Hoffmann, 2021/06/24
- [PATCH v4 17/34] modules: add tracepoints, Gerd Hoffmann, 2021/06/24
- [PATCH v4 16/34] modules: use modinfo for qemu opts load, Gerd Hoffmann, 2021/06/24
- [PATCH v4 18/34] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/24
- [PATCH v4 19/34] modules: check arch on qom lookup, Gerd Hoffmann, 2021/06/24
- [PATCH v4 20/34] modules: target-specific module build infrastructure, Gerd Hoffmann, 2021/06/24
- [PATCH v4 23/34] modules: module.h kerneldoc annotations,
Gerd Hoffmann <=
- [PATCH v4 21/34] modules: add documentation for module sourcesets, Gerd Hoffmann, 2021/06/24
- [PATCH v4 22/34] modules: add module_obj() note to QOM docs, Gerd Hoffmann, 2021/06/24
- [PATCH v4 24/34] modules: hook up modules.h to docs build, Gerd Hoffmann, 2021/06/24
- [PATCH v4 25/34] accel: autoload modules, Gerd Hoffmann, 2021/06/24
- [PATCH v4 26/34] accel: add qtest module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 27/34] accel: build qtest modular, Gerd Hoffmann, 2021/06/24
- [PATCH v4 29/34] accel: build tcg modular, Gerd Hoffmann, 2021/06/24
- [PATCH v4 28/34] accel: add tcg module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 31/34] usb: drop usb_host_dev_is_scsi_storage hook, Gerd Hoffmann, 2021/06/24
- [PATCH v4 30/34] monitor: allow register hmp commands, Gerd Hoffmann, 2021/06/24