[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250819082524.526572-1-liaoyuanhong@vivo.com>
Date: Tue, 19 Aug 2025 16:25:21 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Srinivasan Shanmugam <srinivasan.shanmugam@....com>,
Lijo Lazar <lijo.lazar@....com>,
amd-gfx@...ts.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS),
dri-devel@...ts.freedesktop.org (open list:DRM DRIVERS),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] 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.
Signed-off-by: Liao Yuanhong <liaoyuanhong@...o.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index bcb74286a78a..fd8cca241da6 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;
}
--
2.34.1
Powered by blists - more mailing lists