aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorPhilip Yang <Philip.Yang@amd.com>2018-08-29 10:53:23 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-29 12:36:06 -0500
commitdcaaff4eed13c4dcc15525ff87269b3f4544345a (patch)
tree708808edda144f006c3255acbf5594351b11ba4c /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentdrm/ttm: Initialize local lists in ttm_bo_bulk_move_helper (diff)
downloadlinux-dev-dcaaff4eed13c4dcc15525ff87269b3f4544345a.tar.xz
linux-dev-dcaaff4eed13c4dcc15525ff87269b3f4544345a.zip
drm/amdgpu: remove redundant memset
kvmalloc_array uses __GFP_ZERO flag ensures that the returned address is zeroed already, memset it to zero again afterwards is unnecessary, and in this case buggy because we only clear the first entry. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 521ddb358ec1..f50697df9799 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -541,7 +541,6 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
GFP_KERNEL | __GFP_ZERO);
if (!parent->entries)
return -ENOMEM;
- memset(parent->entries, 0 , sizeof(struct amdgpu_vm_pt));
}
from = saddr >> shift;