]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
drm/amd/powerplay: remove set but not used variable 'stretch_amount2'
[linux.git] / drivers / gpu / drm / amd / powerplay / smumgr / vegam_smumgr.c
index 50896e9b2579e5c74dea6bedf0bedb203cbe12a6..b0e0d67cd54b3e72987f37604326e6f0f48e9085 100644 (file)
@@ -1486,7 +1486,7 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
        struct vegam_smumgr *smu_data =
                        (struct vegam_smumgr *)(hwmgr->smu_backend);
 
-       uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0;
+       uint8_t i, stretch_amount, volt_offset = 0;
        struct phm_ppt_v1_information *table_info =
                        (struct phm_ppt_v1_information *)(hwmgr->pptable);
        struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table =
@@ -1525,11 +1525,9 @@ static int vegam_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr)
                        (table_info->cac_dtp_table->ucCKS_LDO_REFSEL != 0) ?
                        table_info->cac_dtp_table->ucCKS_LDO_REFSEL : 5;
        /* Populate CKS Lookup Table */
-       if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5)
-               stretch_amount2 = 0;
-       else if (stretch_amount == 3 || stretch_amount == 4)
-               stretch_amount2 = 1;
-       else {
+       if (!(stretch_amount == 1 || stretch_amount == 2 ||
+             stretch_amount == 5 || stretch_amount == 3 ||
+             stretch_amount == 4)) {
                phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
                                PHM_PlatformCaps_ClockStretcher);
                PP_ASSERT_WITH_CODE(false,