[Mesa-dev] [PATCH 23/28] amd/vulkan: Remove FREE alias for free
Dylan Baker
dylan at pnwbakers.com
Fri Nov 9 18:40:16 UTC 2018
Even within this directory free and FREE are used interchangeably, and
u_memory has a FREE macro already
---
src/amd/vulkan/radv_radeon_winsys.h | 2 --
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 8 ++++----
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c | 6 +++---
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c | 2 +-
4 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h
index 7977d46229e..ba3943bf797 100644
--- a/src/amd/vulkan/radv_radeon_winsys.h
+++ b/src/amd/vulkan/radv_radeon_winsys.h
@@ -40,8 +40,6 @@ struct radeon_info;
struct ac_surf_info;
struct radeon_surf;
-#define FREE(x) free(x)
-
enum radeon_bo_domain { /* bitfield */
RADEON_DOMAIN_GTT = 2,
RADEON_DOMAIN_VRAM = 4,
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
index 25764d93f6a..8f901e11d26 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
@@ -270,7 +270,7 @@ static void radv_amdgpu_winsys_bo_destroy(struct radeon_winsys_bo *_bo)
amdgpu_bo_free(bo->bo);
}
amdgpu_va_range_free(bo->va_handle);
- FREE(bo);
+ free(bo);
}
static void radv_amdgpu_add_buffer_to_global_list(struct radv_amdgpu_winsys_bo *bo)
@@ -383,7 +383,7 @@ error_bo_alloc:
amdgpu_va_range_free(va_handle);
error_va_alloc:
- FREE(bo);
+ free(bo);
return NULL;
}
@@ -451,7 +451,7 @@ error_va_alloc:
amdgpu_bo_free(buf_handle);
error:
- FREE(bo);
+ free(bo);
return NULL;
}
@@ -514,7 +514,7 @@ error_query:
amdgpu_bo_free(result.buf_handle);
error:
- FREE(bo);
+ free(bo);
return NULL;
}
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
index abc4f3903d3..cd8b13813d2 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
@@ -1238,7 +1238,7 @@ static struct radeon_winsys_ctx *radv_amdgpu_ctx_create(struct radeon_winsys *_w
memset(ctx->fence_map, 0, 4096);
return (struct radeon_winsys_ctx *)ctx;
error_create:
- FREE(ctx);
+ free(ctx);
return NULL;
}
@@ -1247,7 +1247,7 @@ static void radv_amdgpu_ctx_destroy(struct radeon_winsys_ctx *rwctx)
struct radv_amdgpu_ctx *ctx = (struct radv_amdgpu_ctx *)rwctx;
ctx->ws->base.buffer_destroy(ctx->fence_bo);
amdgpu_cs_ctx_free(ctx->ctx);
- FREE(ctx);
+ free(ctx);
}
static bool radv_amdgpu_ctx_wait_idle(struct radeon_winsys_ctx *rwctx,
@@ -1280,7 +1280,7 @@ static struct radeon_winsys_sem *radv_amdgpu_create_sem(struct radeon_winsys *_w
static void radv_amdgpu_destroy_sem(struct radeon_winsys_sem *_sem)
{
struct amdgpu_cs_fence *sem = (struct amdgpu_cs_fence *)_sem;
- FREE(sem);
+ free(sem);
}
static int radv_amdgpu_signal_sems(struct radv_amdgpu_ctx *ctx,
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
index 9706c04e8cd..9311d8ecba7 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -142,7 +142,7 @@ static void radv_amdgpu_winsys_destroy(struct radeon_winsys *rws)
AddrDestroy(ws->addrlib);
amdgpu_device_deinitialize(ws->dev);
- FREE(rws);
+ free(rws);
}
struct radeon_winsys *
--
2.19.1
More information about the mesa-dev
mailing list