diff options
author | Laurent Vivier <lvivier@redhat.com> | 2020-09-20 17:20:24 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2020-09-23 19:11:33 +0200 |
commit | 9e32d4ead3531f70d26e374219884d42e5d8b170 (patch) | |
tree | abea15fd736ac8f44ae72b9b5d6577014e263810 /hw/virtio | |
parent | ab800bb38b2d275209071e6c4f38c4269c178102 (diff) | |
download | qemu-9e32d4ead3531f70d26e374219884d42e5d8b170.zip qemu-9e32d4ead3531f70d26e374219884d42e5d8b170.tar.gz qemu-9e32d4ead3531f70d26e374219884d42e5d8b170.tar.bz2 |
vhost-vdpa: remove useless variable
in vhost_vdpa_listener_region_del(), try_unmap is always true and so,
vhost_vdpa_dma_unmap() is always called. We can remove the variable
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200920152024.860172-1-lvivier@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/virtio')
-rw-r--r-- | hw/virtio/vhost-vdpa.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 97f4b2e..aedc52c 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -153,7 +153,6 @@ static void vhost_vdpa_listener_region_del(MemoryListener *listener, hwaddr iova; Int128 llend, llsize; int ret; - bool try_unmap = true; if (vhost_vdpa_listener_skipped_section(section)) { return; @@ -176,11 +175,9 @@ static void vhost_vdpa_listener_region_del(MemoryListener *listener, llsize = int128_sub(llend, int128_make64(iova)); - if (try_unmap) { - ret = vhost_vdpa_dma_unmap(v, iova, int128_get64(llsize)); - if (ret) { - error_report("vhost_vdpa dma unmap error!"); - } + ret = vhost_vdpa_dma_unmap(v, iova, int128_get64(llsize)); + if (ret) { + error_report("vhost_vdpa dma unmap error!"); } memory_region_unref(section->mr); |