|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC PATCH 02/11] docs/doxygen: Fix doxygen warnings
Fix XEN_GUEST_HANDLE warning on doxygen due to anonymous union/struct
declaration.
Fix of include warning in errno.h
Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
---
xen/include/public/domctl.h | 21 ++++++++++++
xen/include/public/kexec.h | 10 ++++++
xen/include/public/memory.h | 15 +++++++++
xen/include/public/platform.h | 60 ++++++++++++++++++++++++++++++++++-
xen/include/public/sysctl.h | 5 +++
xen/include/public/vcpu.h | 10 ++++++
xen/include/public/xen.h | 10 ++++++
xen/include/xen/errno.h | 6 ++++
xen/include/xen/sched.h | 5 +++
9 files changed, 141 insertions(+), 1 deletion(-)
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 666aeb71bf..29a68af25d 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -407,11 +407,21 @@ struct xen_domctl_scheduler_op {
uint32_t sched_id; /* XEN_SCHEDULER_* */
uint32_t cmd; /* XEN_DOMCTL_SCHEDOP_* */
/* IN/OUT */
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union u {
+#else
union {
+#endif
struct xen_domctl_sched_credit credit;
struct xen_domctl_sched_credit2 credit2;
struct xen_domctl_sched_rtds rtds;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct v {
+#else
struct {
+#endif
XEN_GUEST_HANDLE_64(xen_domctl_schedparam_vcpu_t) vcpus;
/*
* IN: Number of elements in vcpus array.
@@ -521,11 +531,22 @@ struct xen_domctl_assign_device {
uint32_t dev; /* XEN_DOMCTL_DEV_* */
uint32_t flags;
#define XEN_DOMCTL_DEV_RDM_RELAXED 1 /* assign only */
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union u {
+ struct pci {
+#else
union {
struct {
+#endif
uint32_t machine_sbdf; /* machine PCI ID of assigned device */
} pci;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct dt {
+#else
struct {
+#endif
uint32_t size; /* Length of the path */
XEN_GUEST_HANDLE_64(char) path; /* path to the device tree node */
} dt;
diff --git a/xen/include/public/kexec.h b/xen/include/public/kexec.h
index 3f2a118381..6e52206566 100644
--- a/xen/include/public/kexec.h
+++ b/xen/include/public/kexec.h
@@ -172,7 +172,12 @@ typedef struct xen_kexec_range {
* address.
*/
typedef struct xen_kexec_segment {
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union buf {
+#else
union {
+#endif
XEN_GUEST_HANDLE(const_void) h;
uint64_t _pad;
} buf;
@@ -208,7 +213,12 @@ typedef struct xen_kexec_load {
uint8_t _pad;
uint16_t arch; /* ELF machine type (EM_*). */
uint32_t nr_segments;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union segments {
+#else
union {
+#endif
XEN_GUEST_HANDLE(xen_kexec_segment_t) h;
uint64_t _pad;
} segments;
diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index 21d483298e..180c16b91a 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -704,15 +704,30 @@ struct xen_vnuma_topology_info {
unsigned int nr_vcpus;
unsigned int nr_vmemranges;
/* OUT */
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union vdistance {
+#else
union {
+#endif
XEN_GUEST_HANDLE(uint) h;
uint64_t pad;
} vdistance;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union vcpu_to_vnode {
+#else
union {
+#endif
XEN_GUEST_HANDLE(uint) h;
uint64_t pad;
} vcpu_to_vnode;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union vmemrange {
+#else
union {
+#endif
XEN_GUEST_HANDLE(xen_vmemrange_t) h;
uint64_t pad;
} vmemrange;
diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h
index a4c0eb6224..e1c2ae49b6 100644
--- a/xen/include/public/platform.h
+++ b/xen/include/public/platform.h
@@ -172,7 +172,12 @@ struct xenpf_efi_runtime_call {
*/
uint32_t misc;
xen_ulong_t status;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union u {
+#else
union {
+#endif
#define XEN_EFI_GET_TIME_SET_CLEARS_NS 0x00000001
struct {
struct xenpf_efi_time time;
@@ -193,14 +198,36 @@ struct xenpf_efi_runtime_call {
#define XEN_EFI_VARIABLE_NON_VOLATILE 0x00000001
#define XEN_EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define XEN_EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct get_variable {
+#else
struct {
+#endif
XEN_GUEST_HANDLE(void) name; /* UCS-2/UTF-16 string */
xen_ulong_t size;
XEN_GUEST_HANDLE(void) data;
struct xenpf_efi_guid vendor_guid;
- } get_variable, set_variable;
+ } get_variable;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct set_variable {
+#else
+ struct {
+#endif
+ XEN_GUEST_HANDLE(void) name; /* UCS-2/UTF-16 string */
+ xen_ulong_t size;
+ XEN_GUEST_HANDLE(void) data;
+ struct xenpf_efi_guid vendor_guid;
+ } set_variable;
+
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct get_next_variable_name {
+#else
struct {
+#endif
xen_ulong_t size;
XEN_GUEST_HANDLE(void) name; /* UCS-2/UTF-16 string */
struct xenpf_efi_guid vendor_guid;
@@ -214,14 +241,24 @@ struct xenpf_efi_runtime_call {
uint64_t max_size;
} query_variable_info;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct query_capsule_capabilities {
+#else
struct {
+#endif
XEN_GUEST_HANDLE(void) capsule_header_array;
xen_ulong_t capsule_count;
uint64_t max_capsule_size;
uint32_t reset_type;
} query_capsule_capabilities;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct update_capsule {
+#else
struct {
+#endif
XEN_GUEST_HANDLE(void) capsule_header_array;
xen_ulong_t capsule_count;
uint64_t sg_list; /* machine address */
@@ -249,8 +286,14 @@ struct xenpf_firmware_info {
uint32_t type;
uint32_t index;
/* OUT variables. */
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union u {
+ struct disk_info {
+#else
union {
struct {
+#endif
/* Int13, Fn48: Check Extensions Present. */
uint8_t device; /* %dl: bios device number */
uint8_t version; /* %ah: major version */
@@ -267,7 +310,12 @@ struct xenpf_firmware_info {
uint8_t device; /* bios device number */
uint32_t mbr_signature; /* offset 0x1b8 in mbr */
} disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct vbeddc_info {
+#else
struct {
+#endif
/* Int10, AX=4F15: Get EDID info. */
uint8_t capabilities;
uint8_t edid_transfer_time;
@@ -280,7 +328,12 @@ struct xenpf_firmware_info {
uint64_t addr; /* EFI_CONFIGURATION_TABLE */
uint32_t nent;
} cfg;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ struct vendor {
+#else
struct {
+#endif
uint32_t revision;
uint32_t bufsz; /* input, in bytes */
XEN_GUEST_HANDLE(void) name; /* UCS-2/UTF-16 string */
@@ -474,7 +527,12 @@ struct xenpf_set_processor_pminfo {
/* IN variables */
uint32_t id; /* ACPI CPU ID */
uint32_t type; /* {XEN_PM_CX, XEN_PM_PX} */
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union u {
+#else
union {
+#endif
struct xen_processor_power power;/* Cx: _CST/_CSD */
struct xen_processor_performance perf; /* Px: _PPC/_PCT/_PSS/_PSD */
XEN_GUEST_HANDLE(uint32) pdc; /* _PDC */
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index a073647117..4ccf26fc12 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -659,7 +659,12 @@ struct xen_sysctl_scheduler_op {
uint32_t cpupool_id; /* Cpupool whose scheduler is to be targetted. */
uint32_t sched_id; /* XEN_SCHEDULER_* (domctl.h) */
uint32_t cmd; /* XEN_SYSCTL_SCHEDOP_* */
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union u {
+#else
union {
+#endif
struct xen_sysctl_sched_arinc653 {
XEN_GUEST_HANDLE_64(xen_sysctl_arinc653_schedule_t) schedule;
} sched_arinc653;
diff --git a/xen/include/public/vcpu.h b/xen/include/public/vcpu.h
index 3623af932f..688ebc0ac5 100644
--- a/xen/include/public/vcpu.h
+++ b/xen/include/public/vcpu.h
@@ -131,7 +131,12 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_runstate_info_t);
*/
#define VCPUOP_register_runstate_memory_area 5
struct vcpu_register_runstate_memory_area {
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union addr {
+#else
union {
+#endif
XEN_GUEST_HANDLE(vcpu_runstate_info_t) h;
struct vcpu_runstate_info *v;
uint64_t p;
@@ -226,7 +231,12 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_get_physid_t);
#define VCPUOP_register_vcpu_time_memory_area 13
DEFINE_XEN_GUEST_HANDLE(vcpu_time_info_t);
struct vcpu_register_time_memory_area {
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union addr {
+#else
union {
+#endif
XEN_GUEST_HANDLE(vcpu_time_info_t) h;
struct vcpu_time_info *v;
uint64_t p;
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index e373592c33..0255a5ce57 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -444,14 +444,24 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t);
#ifndef __ASSEMBLY__
struct mmuext_op {
unsigned int cmd; /* => enum mmuext_cmd */
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union arg1 {
+#else
union {
+#endif
/* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR
* CLEAR_PAGE, COPY_PAGE, [UN]MARK_SUPER */
xen_pfn_t mfn;
/* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
unsigned long linear_addr;
} arg1;
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union arg2 {
+#else
union {
+#endif
/* SET_LDT */
unsigned int nr_ents;
/* TLB_FLUSH_MULTI, INVLPG_MULTI */
diff --git a/xen/include/xen/errno.h b/xen/include/xen/errno.h
index 69b28dd3c6..598d149fb1 100644
--- a/xen/include/xen/errno.h
+++ b/xen/include/xen/errno.h
@@ -4,9 +4,15 @@
#ifndef __ASSEMBLY__
#define XEN_ERRNO(name, value) name = value,
+#ifdef DOXYGEN
+enum xen_errno {
+#include "../public/errno.h"
+};
+#else
enum {
#include <public/errno.h>
};
+#endif
#else /* !__ASSEMBLY__ */
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 4c380fd4b2..7477577e7e 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -175,7 +175,12 @@ struct vcpu
XEN_GUEST_HANDLE(vcpu_runstate_info_t) runstate_guest; /* guest address */
#else
# define runstate_guest(v) ((v)->runstate_guest.native)
+#ifdef DOXYGEN
+ /* Workaround: Doxygen cannot handle anonymous union/struct */
+ union runstate_guest {
+#else
union {
+#endif
XEN_GUEST_HANDLE(vcpu_runstate_info_t) native;
XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t) compat;
} runstate_guest; /* guest address */
--
2.17.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |