[Qemu-devel] [PATCH qemu] vfio/common: Remove redundand copy of local variable

Alexey Kardashevskiy posted 1 patch 6 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180125041411.6647-1-aik@ozlabs.ru
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test ppc passed
Test s390x passed
hw/vfio/common.c | 1 -
1 file changed, 1 deletion(-)
[Qemu-devel] [PATCH qemu] vfio/common: Remove redundand copy of local variable
Posted by Alexey Kardashevskiy 6 years, 2 months ago
There is already @hostwin in vfio_listener_region_add() so there is no
point in having the other one.

Fixes: 2e4109de "vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)"
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/vfio/common.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index b77be3a..3d652c8 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -435,7 +435,6 @@ static void vfio_listener_region_add(MemoryListener *listener,
     end = int128_get64(int128_sub(llend, int128_one()));
 
     if (container->iommu_type == VFIO_SPAPR_TCE_v2_IOMMU) {
-        VFIOHostDMAWindow *hostwin;
         hwaddr pgsize = 0;
 
         /* For now intersections are not allowed, we may relax this later */
-- 
2.11.0


Re: [Qemu-devel] [PATCH qemu] vfio/common: Remove redundand copy of local variable
Posted by Auger Eric 6 years, 2 months ago
Hi,On 25/01/18 05:14, Alexey Kardashevskiy wrote:
> There is already @hostwin in vfio_listener_region_add() so there is no
> point in having the other one.
> 
> Fixes: 2e4109de "vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)"
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Eric
> ---
>  hw/vfio/common.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> index b77be3a..3d652c8 100644
> --- a/hw/vfio/common.c
> +++ b/hw/vfio/common.c
> @@ -435,7 +435,6 @@ static void vfio_listener_region_add(MemoryListener *listener,
>      end = int128_get64(int128_sub(llend, int128_one()));
>  
>      if (container->iommu_type == VFIO_SPAPR_TCE_v2_IOMMU) {
> -        VFIOHostDMAWindow *hostwin;
>          hwaddr pgsize = 0;
>  
>          /* For now intersections are not allowed, we may relax this later */
>