Skip to contentSkip to conversation

drm/amdgpu/sdma5: silence a warning

PATCH In review Alex Deucher 2 participants 2 messages Mar 31, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/sdma5: silence a warning

This isn't actually a valid warning, but initialize the variable to silence the compiler.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +1 -1
index f485b97ed760..06411fd099ff 100644
@@ -554,7 +554,7 @@ static void sdma_v5_0_rlc_stop(struct amdgpu_device *adev)
  */
 static void sdma_v5_0_ctx_switch_enable(struct amdgpu_device *adev, bool enable)
 {
-	u32 f32_cntl, phase_quantum = 0;
+	u32 f32_cntl = 0, phase_quantum = 0;
 	int i;
 
 	if (amdgpu_sdma_phase_quantum) {
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Acked-by Nirmoy Das on v1 1/1
#1 lore raw
Quoted 4 lines · Alex Deucher

This isn't actually a valid warning, but initialize the variable to silence the compiler.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +0 -0
index f485b97ed760..06411fd099ff 100644

drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c static void sdma_v5_0_rlc_stop(struct amdgpu_device *adev) · line 560

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +1 -1
@@ -554,7 +554,7 @@ static void sdma_v5_0_rlc_stop(struct amdgpu_device *adev)
   */
  static void sdma_v5_0_ctx_switch_enable(struct amdgpu_device *adev, bool enable)
  {
-	u32 f32_cntl, phase_quantum = 0;
+	u32 f32_cntl = 0, phase_quantum = 0;
  	int i;
 
  	if (amdgpu_sdma_phase_quantum) {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx