[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220122143549.914925-1-trix@redhat.com>
Date: Sat, 22 Jan 2022 06:35:49 -0800
From: trix@...hat.com
To: Felix.Kuehling@....com, alexander.deucher@....com,
christian.koenig@....com, Xinhui.Pan@....com, airlied@...ux.ie,
daniel@...ll.ch
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, Tom Rix <trix@...hat.com>
Subject: [PATCH] drm/amdkfd: simplify else if to else check of MIGRATION_COPY_DIR
From: Tom Rix <trix@...hat.com>
The enum MIGRATION_COPY_DIR type has 2 values. So
the else-if can be converted to an else.
Signed-off-by: Tom Rix <trix@...hat.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index d986f9ee0e1f4..c06c44f37b00e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -146,7 +146,8 @@ svm_migrate_copy_memory_gart(struct amdgpu_device *adev, dma_addr_t *sys,
gart_s = svm_migrate_direct_mapping_addr(adev, *vram);
r = svm_migrate_gart_map(ring, size, sys, &gart_d, 0);
- } else if (direction == FROM_RAM_TO_VRAM) {
+ } else {
+ /* direction == FROM_RAM_TO_VRAM */
r = svm_migrate_gart_map(ring, size, sys, &gart_s,
KFD_IOCTL_SVM_FLAG_GPU_RO);
gart_d = svm_migrate_direct_mapping_addr(adev, *vram);
--
2.26.3
Powered by blists - more mailing lists