mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
remove unnecessary casts from uintptr_t
uintptr_t, or unsigned long which is equivalent on Linux I32LP64 systems, is an unsigned type and there is no need to further cast to __u64 which is another unsigned integer type; widening casts from unsigned integers zero-extend the value. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
729ba8e933
commit
592d0bc030
4 changed files with 8 additions and 8 deletions
|
@ -1000,7 +1000,7 @@ vfio_device_feature_dma_logging_start_create(VFIOContainerBase *bcontainer,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
control->ranges = (__u64)(uintptr_t)ranges;
|
||||
control->ranges = (uintptr_t)ranges;
|
||||
if (tracking->max32) {
|
||||
ranges->iova = tracking->min32;
|
||||
ranges->length = (tracking->max32 - tracking->min32) + 1;
|
||||
|
@ -1126,7 +1126,7 @@ static int vfio_device_dma_logging_report(VFIODevice *vbasedev, hwaddr iova,
|
|||
report->iova = iova;
|
||||
report->length = size;
|
||||
report->page_size = qemu_real_host_page_size();
|
||||
report->bitmap = (__u64)(uintptr_t)bitmap;
|
||||
report->bitmap = (uintptr_t)bitmap;
|
||||
|
||||
feature->argsz = sizeof(buf);
|
||||
feature->flags = VFIO_DEVICE_FEATURE_GET |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue