Skip to contentSkip to conversation

drm/amdgpu: fix the missing braces

PATCH In review Huang Rui 2 participants 3 messages Mar 25, 2020 – Mar 26, 2020

Subsystems (2)
lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix the missing braces

The braces are missed around amdgpu_ttm_training_reserve_vram_init().

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2 -1
index b397148..8afe62a 100644
@@ -1938,10 +1938,11 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
 	 *The reserved vram for memory training must be pinned to the specified
 	 *place on the VRAM, so reserve it early.
 	 */
-	if (!amdgpu_sriov_vf(adev))
+	if (!amdgpu_sriov_vf(adev)) {
 		r = amdgpu_ttm_training_reserve_vram_init(adev);
 		if (r)
 			return r;
+	}
 
 	/* allocate memory as required for VGA
 	 * This is used for VGA emulation and pre-OS scanout buffers to
Signature · 6 lines
2.7.4

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

Hi Ray,

I pushed a fix few minutes ago :)

Regards,

Nirmoy

Quoted 14 lines · Huang Rui

The braces are missed around amdgpu_ttm_training_reserve_vram_init().

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -0
index b397148..8afe62a 100644
@@ -1938,10 +1938,11 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
  	 *The reserved vram for memory training must be pinned to the specified
  	 *place on the VRAM, so reserve it early.

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device *adev) · line 1948

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2 -1
  	 */
-	if (!amdgpu_sriov_vf(adev))
+	if (!amdgpu_sriov_vf(adev)) {
  		r = amdgpu_ttm_training_reserve_vram_init(adev);
  		if (r)
  			return r;
+	}
 
  	/* allocate memory as required for VGA
  	 * This is used for VGA emulation and pre-OS scanout buffers to

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

author
#2 lore raw
Quoted 4 lines · Nirmoy

Hi Ray,

I pushed a fix few minutes ago :)

No problem, that's fine. I should have looked at the mail list firstly.

Thanks,
Ray

Quoted 28 lines

Regards,

Nirmoy

Quoted 22 lines · Huang Rui

The braces are missed around amdgpu_ttm_training_reserve_vram_init().

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +2 -1
index b397148..8afe62a 100644
@@ -1938,10 +1938,11 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
  	 *The reserved vram for memory training must be pinned to the specified
  	 *place on the VRAM, so reserve it early.
  	 */
-	if (!amdgpu_sriov_vf(adev))
+	if (!amdgpu_sriov_vf(adev)) {
  		r = amdgpu_ttm_training_reserve_vram_init(adev);
  		if (r)
  			return r;
+	}
 
Quoted 2 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device *adev) · line 1948

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -0
  	/* allocate memory as required for VGA
  	 * This is used for VGA emulation and pre-OS scanout buffers to

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