* [PATCH] reserve_bo_and_cond_vms: Remove unnecessary condition check
@ 2020-04-18 3:20 ` Bernard Zhao
0 siblings, 0 replies; 3+ messages in thread
From: Bernard Zhao @ 2020-04-18 3:20 UTC (permalink / raw)
To: Felix Kuehling, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter, amd-gfx,
dri-devel, linux-kernel
Cc: opensource.kernel, Bernard Zhao
There is no need to if check again, maybe we could merge
into the above else branch.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 9dff792..327317c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -735,10 +735,8 @@ static int reserve_bo_and_cond_vms(struct kgd_mem *mem,
false, &ctx->duplicates);
if (!ret)
ctx->reserved = true;
- else
+ else {
pr_err("Failed to reserve buffers in ttm.\n");
-
- if (ret) {
kfree(ctx->vm_pd);
ctx->vm_pd = NULL;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] reserve_bo_and_cond_vms: Remove unnecessary condition check
@ 2020-04-18 3:20 ` Bernard Zhao
0 siblings, 0 replies; 3+ messages in thread
From: Bernard Zhao @ 2020-04-18 3:20 UTC (permalink / raw)
To: Felix Kuehling, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter, amd-gfx,
dri-devel, linux-kernel
Cc: opensource.kernel, Bernard Zhao
There is no need to if check again, maybe we could merge
into the above else branch.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 9dff792..327317c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -735,10 +735,8 @@ static int reserve_bo_and_cond_vms(struct kgd_mem *mem,
false, &ctx->duplicates);
if (!ret)
ctx->reserved = true;
- else
+ else {
pr_err("Failed to reserve buffers in ttm.\n");
-
- if (ret) {
kfree(ctx->vm_pd);
ctx->vm_pd = NULL;
}
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] reserve_bo_and_cond_vms: Remove unnecessary condition check
@ 2020-04-18 3:20 ` Bernard Zhao
0 siblings, 0 replies; 3+ messages in thread
From: Bernard Zhao @ 2020-04-18 3:20 UTC (permalink / raw)
To: Felix Kuehling, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter, amd-gfx,
dri-devel, linux-kernel
Cc: opensource.kernel, Bernard Zhao
There is no need to if check again, maybe we could merge
into the above else branch.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 9dff792..327317c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -735,10 +735,8 @@ static int reserve_bo_and_cond_vms(struct kgd_mem *mem,
false, &ctx->duplicates);
if (!ret)
ctx->reserved = true;
- else
+ else {
pr_err("Failed to reserve buffers in ttm.\n");
-
- if (ret) {
kfree(ctx->vm_pd);
ctx->vm_pd = NULL;
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-18 9:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 3:20 [PATCH] reserve_bo_and_cond_vms: Remove unnecessary condition check Bernard Zhao
2020-04-18 3:20 ` Bernard Zhao
2020-04-18 3:20 ` Bernard Zhao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.