RE: [PATCH] drm/amd/powerplay: Fix code error for translating int type to bool type correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Hawking Zhang <Hawking.Zhang@xxxxxxx>

Regards,
Hawking
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Chengming Gui
Sent: 2019年5月21日 19:46
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: Gui, Jack <Jack.Gui@xxxxxxx>
Subject: [PATCH] drm/amd/powerplay: Fix code error for translating int type to bool type correctly

[CAUTION: External Email]

Fix code error to support value < 0 or > 1.

Signed-off-by: Chengming Gui <Jack.Gui@xxxxxxx>
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 3a47130..d5f03b9 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -348,7 +348,7 @@ static int smu_early_init(void *handle)
        struct smu_context *smu = &adev->smu;

        smu->adev = adev;
-       smu->pm_enabled = amdgpu_dpm;
+       smu->pm_enabled = !!amdgpu_dpm;
        mutex_init(&smu->mutex);

        return smu_set_funcs(adev);
--
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux