summaryrefslogtreecommitdiff
path: root/include/arch/x86_64/xen
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-25 19:24:38 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-25 20:35:03 +0100
commita984eb367c032dbe2577f01238c3d1268526be70 (patch)
tree437fef40379b2758b129ccea39df3570fa2d145e /include/arch/x86_64/xen
parent8834571b202cf4dc9c649cfb096c213b6ecf1566 (diff)
Clang-tidy fixes
Diffstat (limited to 'include/arch/x86_64/xen')
-rw-r--r--include/arch/x86_64/xen/evtchn.h21
-rw-r--r--include/arch/x86_64/xen/gntalloc.h9
-rw-r--r--include/arch/x86_64/xen/gntdev.h32
-rw-r--r--include/arch/x86_64/xen/privcmd.h26
4 files changed, 30 insertions, 58 deletions
diff --git a/include/arch/x86_64/xen/evtchn.h b/include/arch/x86_64/xen/evtchn.h
index fbba8441..959bac91 100644
--- a/include/arch/x86_64/xen/evtchn.h
+++ b/include/arch/x86_64/xen/evtchn.h
@@ -38,8 +38,7 @@
* Bind a fresh port to VIRQ @virq.
* Return allocated port.
*/
-#define IOCTL_EVTCHN_BIND_VIRQ \
- _IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))
+#define IOCTL_EVTCHN_BIND_VIRQ _IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))
struct ioctl_evtchn_bind_virq {
unsigned int virq;
};
@@ -48,8 +47,7 @@ struct ioctl_evtchn_bind_virq {
* Bind a fresh port to remote <@remote_domain, @remote_port>.
* Return allocated port.
*/
-#define IOCTL_EVTCHN_BIND_INTERDOMAIN \
- _IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))
+#define IOCTL_EVTCHN_BIND_INTERDOMAIN _IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))
struct ioctl_evtchn_bind_interdomain {
unsigned int remote_domain, remote_port;
};
@@ -58,8 +56,7 @@ struct ioctl_evtchn_bind_interdomain {
* Allocate a fresh port for binding to @remote_domain.
* Return allocated port.
*/
-#define IOCTL_EVTCHN_BIND_UNBOUND_PORT \
- _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
+#define IOCTL_EVTCHN_BIND_UNBOUND_PORT _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))
struct ioctl_evtchn_bind_unbound_port {
unsigned int remote_domain;
};
@@ -67,8 +64,7 @@ struct ioctl_evtchn_bind_unbound_port {
/*
* Unbind previously allocated @port.
*/
-#define IOCTL_EVTCHN_UNBIND \
- _IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
+#define IOCTL_EVTCHN_UNBIND _IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))
struct ioctl_evtchn_unbind {
unsigned int port;
};
@@ -76,8 +72,7 @@ struct ioctl_evtchn_unbind {
/*
* Unbind previously allocated @port.
*/
-#define IOCTL_EVTCHN_NOTIFY \
- _IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
+#define IOCTL_EVTCHN_NOTIFY _IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))
struct ioctl_evtchn_notify {
unsigned int port;
};
@@ -94,8 +89,7 @@ struct ioctl_evtchn_notify {
* which were bound before restricting remain bound afterwards, and
* can be notified as usual.
*/
-#define IOCTL_EVTCHN_RESTRICT_DOMID \
- _IOC(_IOC_NONE, 'E', 6, sizeof(struct ioctl_evtchn_restrict_domid))
+#define IOCTL_EVTCHN_RESTRICT_DOMID _IOC(_IOC_NONE, 'E', 6, sizeof(struct ioctl_evtchn_restrict_domid))
struct ioctl_evtchn_restrict_domid {
domid_t domid;
};
@@ -103,8 +97,7 @@ struct ioctl_evtchn_restrict_domid {
/*
* Bind statically allocated @port.
*/
-#define IOCTL_EVTCHN_BIND_STATIC \
- _IOC(_IOC_NONE, 'E', 7, sizeof(struct ioctl_evtchn_bind))
+#define IOCTL_EVTCHN_BIND_STATIC _IOC(_IOC_NONE, 'E', 7, sizeof(struct ioctl_evtchn_bind))
struct ioctl_evtchn_bind {
unsigned int port;
};
diff --git a/include/arch/x86_64/xen/gntalloc.h b/include/arch/x86_64/xen/gntalloc.h
index 58b3a8b8..7ec7e7be 100644
--- a/include/arch/x86_64/xen/gntalloc.h
+++ b/include/arch/x86_64/xen/gntalloc.h
@@ -16,8 +16,7 @@
/*
* Allocates a new page and creates a new grant reference.
*/
-#define IOCTL_GNTALLOC_ALLOC_GREF \
- _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref))
+#define IOCTL_GNTALLOC_ALLOC_GREF _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref))
struct ioctl_gntalloc_alloc_gref {
/* IN parameters */
/* The ID of the domain to be given access to the grants. */
@@ -43,8 +42,7 @@ struct ioctl_gntalloc_alloc_gref {
* Deallocates the grant reference, allowing the associated page to be freed if
* no other domains are using it.
*/
-#define IOCTL_GNTALLOC_DEALLOC_GREF \
- _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref))
+#define IOCTL_GNTALLOC_DEALLOC_GREF _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref))
struct ioctl_gntalloc_dealloc_gref {
/* IN parameters */
/* The offset returned in the map operation */
@@ -63,8 +61,7 @@ struct ioctl_gntalloc_dealloc_gref {
* notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it
* to occur.
*/
-#define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY \
- _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify))
+#define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify))
struct ioctl_gntalloc_unmap_notify {
/* IN parameters */
/* Offset in the file descriptor for a byte within the page (same as
diff --git a/include/arch/x86_64/xen/gntdev.h b/include/arch/x86_64/xen/gntdev.h
index 9d26b9f6..d61a1dd6 100644
--- a/include/arch/x86_64/xen/gntdev.h
+++ b/include/arch/x86_64/xen/gntdev.h
@@ -55,8 +55,7 @@ struct ioctl_gntdev_grant_ref {
* mmap()'d at offset 0, such as Wayland. If @count is set to 0, this
* ioctl will fail.
*/
-#define IOCTL_GNTDEV_MAP_GRANT_REF \
- _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
+#define IOCTL_GNTDEV_MAP_GRANT_REF _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
struct ioctl_gntdev_map_grant_ref {
/* IN parameters */
/* The number of grants to be mapped. */
@@ -75,8 +74,7 @@ struct ioctl_gntdev_map_grant_ref {
* gntdev. N.B. munmap() must be called on the relevant virtual address(es)
* before this ioctl is called, or an error will result.
*/
-#define IOCTL_GNTDEV_UNMAP_GRANT_REF \
- _IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))
+#define IOCTL_GNTDEV_UNMAP_GRANT_REF _IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))
struct ioctl_gntdev_unmap_grant_ref {
/* IN parameters */
/* The offset was returned by the corresponding map operation. */
@@ -98,9 +96,7 @@ struct ioctl_gntdev_unmap_grant_ref {
* an error will result. It is only possible to munmap() the entire
* contiguously-allocated range at once, and not any subrange thereof.
*/
-#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \
- _IOC(_IOC_NONE, 'G', 2, \
- sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
+#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR _IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
struct ioctl_gntdev_get_offset_for_vaddr {
/* IN parameters */
/* The virtual address of the first mapped page in a range. */
@@ -119,8 +115,7 @@ struct ioctl_gntdev_get_offset_for_vaddr {
*
* N.B. This must be called before any other ioctl is performed on the device.
*/
-#define IOCTL_GNTDEV_SET_MAX_GRANTS \
- _IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants))
+#define IOCTL_GNTDEV_SET_MAX_GRANTS _IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants))
struct ioctl_gntdev_set_max_grants {
/* IN parameter */
/* The maximum number of grants that may be mapped at once. */
@@ -137,8 +132,7 @@ struct ioctl_gntdev_set_max_grants {
* notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it
* to occur.
*/
-#define IOCTL_GNTDEV_SET_UNMAP_NOTIFY \
- _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify))
+#define IOCTL_GNTDEV_SET_UNMAP_NOTIFY _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify))
struct ioctl_gntdev_unmap_notify {
/* IN parameters */
/* Offset in the file descriptor for a byte within the page (same as
@@ -196,8 +190,7 @@ struct gntdev_grant_copy_segment {
* EINVAL: A segment crosses the boundary of a foreign page.
* EFAULT: A segment's local buffer is not accessible.
*/
-#define IOCTL_GNTDEV_GRANT_COPY \
- _IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy))
+#define IOCTL_GNTDEV_GRANT_COPY _IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy))
struct ioctl_gntdev_grant_copy {
unsigned int count;
struct gntdev_grant_copy_segment *segments;
@@ -238,9 +231,7 @@ struct ioctl_gntdev_grant_copy {
* [1] Documentation/driver-api/dma-buf.rst
*/
-#define IOCTL_GNTDEV_DMABUF_EXP_FROM_REFS \
- _IOC(_IOC_NONE, 'G', 9, \
- sizeof(struct ioctl_gntdev_dmabuf_exp_from_refs))
+#define IOCTL_GNTDEV_DMABUF_EXP_FROM_REFS _IOC(_IOC_NONE, 'G', 9, sizeof(struct ioctl_gntdev_dmabuf_exp_from_refs))
struct ioctl_gntdev_dmabuf_exp_from_refs {
/* IN parameters. */
/* Specific options for this dma-buf: see GNTDEV_DMA_FLAG_XXX. */
@@ -269,8 +260,7 @@ struct ioctl_gntdev_dmabuf_exp_from_refs {
* this must not be treated as error.
*/
#define IOCTL_GNTDEV_DMABUF_EXP_WAIT_RELEASED \
- _IOC(_IOC_NONE, 'G', 10, \
- sizeof(struct ioctl_gntdev_dmabuf_exp_wait_released))
+ _IOC(_IOC_NONE, 'G', 10, sizeof(struct ioctl_gntdev_dmabuf_exp_wait_released))
struct ioctl_gntdev_dmabuf_exp_wait_released {
/* IN parameters */
__u32 fd;
@@ -281,8 +271,7 @@ struct ioctl_gntdev_dmabuf_exp_wait_released {
* Import a dma-buf with file descriptor @fd and export granted references
* to the pages of that dma-buf into array @refs of size @count.
*/
-#define IOCTL_GNTDEV_DMABUF_IMP_TO_REFS \
- _IOC(_IOC_NONE, 'G', 11, sizeof(struct ioctl_gntdev_dmabuf_imp_to_refs))
+#define IOCTL_GNTDEV_DMABUF_IMP_TO_REFS _IOC(_IOC_NONE, 'G', 11, sizeof(struct ioctl_gntdev_dmabuf_imp_to_refs))
struct ioctl_gntdev_dmabuf_imp_to_refs {
/* IN parameters. */
/* File descriptor of the dma-buf. */
@@ -303,8 +292,7 @@ struct ioctl_gntdev_dmabuf_imp_to_refs {
* @fd, so it can be released by the owner. This is only valid for buffers
* created with IOCTL_GNTDEV_DMABUF_IMP_TO_REFS.
*/
-#define IOCTL_GNTDEV_DMABUF_IMP_RELEASE \
- _IOC(_IOC_NONE, 'G', 12, sizeof(struct ioctl_gntdev_dmabuf_imp_release))
+#define IOCTL_GNTDEV_DMABUF_IMP_RELEASE _IOC(_IOC_NONE, 'G', 12, sizeof(struct ioctl_gntdev_dmabuf_imp_release))
struct ioctl_gntdev_dmabuf_imp_release {
/* IN parameters */
__u32 fd;
diff --git a/include/arch/x86_64/xen/privcmd.h b/include/arch/x86_64/xen/privcmd.h
index b5011e68..686f11ef 100644
--- a/include/arch/x86_64/xen/privcmd.h
+++ b/include/arch/x86_64/xen/privcmd.h
@@ -144,21 +144,15 @@ struct privcmd_pcidev_get_gsi {
* if the operation was otherwise successful but any frame failed with
* -ENOENT, then -1 is returned and errno is set to ENOENT.
*/
-#define IOCTL_PRIVCMD_HYPERCALL \
- _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall))
-#define IOCTL_PRIVCMD_MMAP _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap))
-#define IOCTL_PRIVCMD_MMAPBATCH \
- _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch))
-#define IOCTL_PRIVCMD_MMAPBATCH_V2 \
- _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2))
-#define IOCTL_PRIVCMD_DM_OP \
- _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op))
-#define IOCTL_PRIVCMD_RESTRICT _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t))
-#define IOCTL_PRIVCMD_MMAP_RESOURCE \
- _IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource))
-#define IOCTL_PRIVCMD_IRQFD _IOW('P', 8, struct privcmd_irqfd)
-#define IOCTL_PRIVCMD_IOEVENTFD _IOW('P', 9, struct privcmd_ioeventfd)
-#define IOCTL_PRIVCMD_PCIDEV_GET_GSI \
- _IOC(_IOC_NONE, 'P', 10, sizeof(struct privcmd_pcidev_get_gsi))
+#define IOCTL_PRIVCMD_HYPERCALL _IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall))
+#define IOCTL_PRIVCMD_MMAP _IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap))
+#define IOCTL_PRIVCMD_MMAPBATCH _IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch))
+#define IOCTL_PRIVCMD_MMAPBATCH_V2 _IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2))
+#define IOCTL_PRIVCMD_DM_OP _IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op))
+#define IOCTL_PRIVCMD_RESTRICT _IOC(_IOC_NONE, 'P', 6, sizeof(domid_t))
+#define IOCTL_PRIVCMD_MMAP_RESOURCE _IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource))
+#define IOCTL_PRIVCMD_IRQFD _IOW('P', 8, struct privcmd_irqfd)
+#define IOCTL_PRIVCMD_IOEVENTFD _IOW('P', 9, struct privcmd_ioeventfd)
+#define IOCTL_PRIVCMD_PCIDEV_GET_GSI _IOC(_IOC_NONE, 'P', 10, sizeof(struct privcmd_pcidev_get_gsi))
#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */