Skip to contentSkip to conversation

drm/amd/pp: missing curly braces in smu7_enable_sclk_mclk_dpm()

PATCH Applied Dan Carpenter 2 participants 2 messages May 17, 2018

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

PATCH 1/1 drm/amd/pp: missing curly braces in smu7_enable_sclk_mclk_dpm()

We added some more lines of code to this if statement but forgot to add curly braces.

Fixes 0c24e7ef233b ("drm/amd/powerplay: add specific changes for VEGAM in smu7_hwmgr.c")
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -1
index 8eb3f5176646..646c9e9bf681 100644
@@ -1018,7 +1018,7 @@ static int smu7_enable_sclk_mclk_dpm(struct pp_hwmgr *hwmgr)
 	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
 
 	/* enable SCLK dpm */
-	if (!data->sclk_dpm_key_disabled)
+	if (!data->sclk_dpm_key_disabled) {
 		if (hwmgr->chip_id == CHIP_VEGAM)
 			smu7_disable_sclk_vce_handshake(hwmgr);
 
@@ -1026,6 +1026,7 @@ static int smu7_enable_sclk_mclk_dpm(struct pp_hwmgr *hwmgr)
 		(0 == smum_send_msg_to_smc(hwmgr, PPSMC_MSG_DPM_Enable)),
 		"Failed to enable SCLK DPM during DPM Start Function!",
 		return -EINVAL);
+	}
 
 	/* enable MCLK dpm */
 	if (0 == data->mclk_dpm_key_disabled) {

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

Applied
#1 lore raw
Quoted 5 lines · Dan Carpenter

We added some more lines of code to this if statement but forgot to add curly braces.

Fixes 0c24e7ef233b ("drm/amd/powerplay: add specific changes for VEGAM in smu7_hwmgr.c")

Applied. thanks!

Alex

Quoted 22 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -1
index 8eb3f5176646..646c9e9bf681 100644
@@ -1018,7 +1018,7 @@ static int smu7_enable_sclk_mclk_dpm(struct pp_hwmgr *hwmgr)
        struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
 
        /* enable SCLK dpm */
-       if (!data->sclk_dpm_key_disabled)
+       if (!data->sclk_dpm_key_disabled) {
                if (hwmgr->chip_id == CHIP_VEGAM)
                        smu7_disable_sclk_vce_handshake(hwmgr);
 
@@ -1026,6 +1026,7 @@ static int smu7_enable_sclk_mclk_dpm(struct pp_hwmgr *hwmgr)
                (0 == smum_send_msg_to_smc(hwmgr, PPSMC_MSG_DPM_Enable)),
                "Failed to enable SCLK DPM during DPM Start Function!",
                return -EINVAL);
+       }
 
        /* enable MCLK dpm */
        if (0 == data->mclk_dpm_key_disabled) {
Quoted 4 lines

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

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