mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 05:51:53 -06:00
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>
This commit is contained in:
parent
7a1dc45af5
commit
850051b94b
1 changed files with 1 additions and 1 deletions
|
@ -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) +
|
uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) +
|
||||||
sizeof(struct vfio_device_feature_dma_logging_report),
|
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 *feature = (struct vfio_device_feature *)buf;
|
||||||
struct vfio_device_feature_dma_logging_report *report =
|
struct vfio_device_feature_dma_logging_report *report =
|
||||||
(struct vfio_device_feature_dma_logging_report *)feature->data;
|
(struct vfio_device_feature_dma_logging_report *)feature->data;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue