]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: remove not needed memset
authorzhengbin <zhengbin13@huawei.com>
Mon, 18 Nov 2019 09:00:31 +0000 (17:00 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Nov 2019 15:12:54 +0000 (10:12 -0500)
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c:64:13-31: WARNING: dma_alloc_coherent use in ih -> ring already zeroes out memory,  so memset is not needed

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c

index 6d8f05511ababb761d8bd97cf3cbb72a00720fd1..111a301ce878b2a619e7b4849fcd5f787497a631 100644 (file)
@@ -66,7 +66,6 @@ int amdgpu_ih_ring_init(struct amdgpu_device *adev, struct amdgpu_ih_ring *ih,
                if (ih->ring == NULL)
                        return -ENOMEM;
 
-               memset((void *)ih->ring, 0, ih->ring_size + 8);
                ih->gpu_addr = dma_addr;
                ih->wptr_addr = dma_addr + ih->ring_size;
                ih->wptr_cpu = &ih->ring[ih->ring_size / 4];