drm/amdgpu: remove not needed memset
Subsystems (2)
PATCH 1/1 drm/amdgpu: remove not needed memset
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
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +0 -1
@@ -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 ];
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1574067631-26219-1-git-send-email-zhengbin13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Alex Deucher
AppliedApplied. thanks!
Alex
Quoted 26 lines · zhengbin
Fixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c:64:13-31: WARNING:
dma_alloc_coherentuse in ih -> ring already zeroes out memory, so memset is not neededReported-by Hulk Robot <[email protected]>Signed-off-by zhengbin <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c +0
-2@@ -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 ]; --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx