Since commit 7429aebe1cff ("vfio/migration: Remove VFIO migration
protocol v1"), vfio_region_unmap() lost all its callers.

Remove unused vfio_region_unmap().

Signed-off-by: Xiaoyao Li <[email protected]>
---
 hw/vfio/region.c      | 15 ---------------
 hw/vfio/vfio-region.h |  1 -
 2 files changed, 16 deletions(-)

diff --git a/hw/vfio/region.c b/hw/vfio/region.c
index 0342ca712acd..dbde33918026 100644
--- a/hw/vfio/region.c
+++ b/hw/vfio/region.c
@@ -468,21 +468,6 @@ no_mmap:
     return ret;
 }
 
-void vfio_region_unmap(VFIORegion *region)
-{
-    int i;
-
-    if (!region->mem) {
-        return;
-    }
-
-    for (i = 0; i < region->nr_mmaps; i++) {
-        if (region->mmaps[i].mmap) {
-            vfio_subregion_unmap(region, i);
-        }
-    }
-}
-
 void vfio_region_exit(VFIORegion *region)
 {
     int i;
diff --git a/hw/vfio/vfio-region.h b/hw/vfio/vfio-region.h
index 9b21d4ee5ba1..58b236f1133e 100644
--- a/hw/vfio/vfio-region.h
+++ b/hw/vfio/vfio-region.h
@@ -41,7 +41,6 @@ int vfio_region_setup(Object *obj, VFIODevice *vbasedev, 
VFIORegion *region,
                       int index, const char *name, Error **errp);
 int vfio_region_mmap(VFIORegion *region);
 void vfio_region_mmaps_set_enabled(VFIORegion *region, bool enabled);
-void vfio_region_unmap(VFIORegion *region);
 void vfio_region_exit(VFIORegion *region);
 void vfio_region_finalize(VFIORegion *region);
 
-- 
2.43.0


Reply via email to