From: Liao Yuanhong Date: Tue, 19 Aug 2025 08:25:21 +0000 (+0800) Subject: drm/amdgpu/fence: Remove redundant 0 value initialization X-Git-Tag: v6.18-rc1~134^2~19^2~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee6ba1e69dd7d969ab36f16d81c930b1a7fbf61c;p=thirdparty%2Flinux.git drm/amdgpu/fence: Remove redundant 0 value initialization The amdgpu_fence struct is already zeroed by kzalloc(). It's redundant to initialize am_fence->context to 0. Reviewed-by: Christian König Signed-off-by: Liao Yuanhong Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index bcb74286a78a1..fd8cca241da62 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -120,7 +120,6 @@ int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **f, am_fence = kzalloc(sizeof(*am_fence), GFP_KERNEL); if (!am_fence) return -ENOMEM; - am_fence->context = 0; } else { am_fence = af; }