aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio/common.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-01-17 17:03:44 +0100
committerCédric Le Goater <clg@redhat.com>2024-01-29 08:26:25 +0100
commit850051b94b4eac2e2eec985b313d840bd5eddb44 (patch)
tree58fd70111c9ffc4fe09cf4ce0df412f7b661ef0f /hw/vfio/common.c
parent7a1dc45af581d2b643cdbf33c01fd96271616fbd (diff)
downloadqemu-850051b94b4eac2e2eec985b313d840bd5eddb44.zip
qemu-850051b94b4eac2e2eec985b313d840bd5eddb44.tar.gz
qemu-850051b94b4eac2e2eec985b313d840bd5eddb44.tar.bz2
vfio: use matching sizeof type
Do not use uint64_t for the type of the declaration and __u64 when computing the number of elements in the array. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/vfio/common.c')
-rw-r--r--hw/vfio/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 4aa86f5..059bfdc 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -1118,7 +1118,7 @@ static int vfio_device_dma_logging_report(VFIODevice *vbasedev, hwaddr iova,
{
uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) +
sizeof(struct vfio_device_feature_dma_logging_report),
- sizeof(__u64))] = {};
+ sizeof(uint64_t))] = {};
struct vfio_device_feature *feature = (struct vfio_device_feature *)buf;
struct vfio_device_feature_dma_logging_report *report =
(struct vfio_device_feature_dma_logging_report *)feature->data;