* Re: [PATCH 1/1] drm/amdgpu: add missing if clause guard
2020-03-25 15:24 [PATCH 1/1] drm/amdgpu: add missing if clause guard Nirmoy Das
@ 2020-03-25 15:22 ` Deucher, Alexander
0 siblings, 0 replies; 2+ messages in thread
From: Deucher, Alexander @ 2020-03-25 15:22 UTC (permalink / raw)
To: Nirmoy Das, amd-gfx; +Cc: Das, Nirmoy, Koenig, Christian, Liu, Monk
[-- Attachment #1.1: Type: text/plain, Size: 1783 bytes --]
[AMD Public Use]
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: Nirmoy Das <nirmoy.aiemd@gmail.com>
Sent: Wednesday, March 25, 2020 11:24 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Liu, Monk <Monk.Liu@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Das, Nirmoy <Nirmoy.Das@amd.com>
Subject: [PATCH 1/1] drm/amdgpu: add missing if clause guard
Fixes: 635f3790ac964 (drm/amdgpu: don't try to reserve training bo for sriov)
compilation warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function ‘amdgpu_ttm_init’:
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1862:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
1862 | if (!amdgpu_sriov_vf(adev))
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 54cfa3a12135..e192557db421 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1859,10 +1859,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
--
2.25.1
[-- Attachment #1.2: Type: text/html, Size: 3442 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/1] drm/amdgpu: add missing if clause guard
@ 2020-03-25 15:24 Nirmoy Das
2020-03-25 15:22 ` Deucher, Alexander
0 siblings, 1 reply; 2+ messages in thread
From: Nirmoy Das @ 2020-03-25 15:24 UTC (permalink / raw)
To: amd-gfx; +Cc: alexander.deucher, nirmoy.das, christian.koenig, Monk.Liu
Fixes: 635f3790ac964 (drm/amdgpu: don't try to reserve training bo for sriov)
compilation warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c: In function ‘amdgpu_ttm_init’:
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1862:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
1862 | if (!amdgpu_sriov_vf(adev))
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 54cfa3a12135..e192557db421 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1859,10 +1859,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
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-25 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 15:24 [PATCH 1/1] drm/amdgpu: add missing if clause guard Nirmoy Das
2020-03-25 15:22 ` Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.