Skip to contentSkip to conversation

drm/radeon/ci_dpm: Remove redundant initialization of variables hi_sidd, lo_sidd

PATCH Applied Colin King 2 participants 2 messages Sep 7, 2021

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 drm/radeon/ci_dpm: Remove redundant initialization of variables hi_sidd, lo_sidd

From: Colin Ian King <[email protected]>

The variables hi_sidd and lo_sidd are being initialized with a values that are never read, they are being updated later on. The assignments are redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/gpu/drm/radeon/ci_dpm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/radeon/ci_dpm.c +1 -2
index f0cfb58da467..ac006bed4743 100644
@@ -390,8 +390,7 @@ static int ci_min_max_v_gnbl_pm_lid_from_bapm_vddc(struct radeon_device *rdev)
 static int ci_populate_bapm_vddc_base_leakage_sidd(struct radeon_device *rdev)
 {
 	struct ci_power_info *pi = ci_get_pi(rdev);
-	u16 hi_sidd = pi->smc_powertune_table.BapmVddCBaseLeakageHiSidd;
-	u16 lo_sidd = pi->smc_powertune_table.BapmVddCBaseLeakageLoSidd;
+	u16 hi_sidd, lo_sidd;
 	struct radeon_cac_tdp_table *cac_tdp_table =
 		rdev->pm.dpm.dyn_state.cac_tdp_table;
 
Signature · 1 line
2.32.0
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 30 lines · Colin King

From: Colin Ian King <[email protected]>

The variables hi_sidd and lo_sidd are being initialized with a values that are never read, they are being updated later on. The assignments are redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/gpu/drm/radeon/ci_dpm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/radeon/ci_dpm.c +1 -3
index f0cfb58da467..ac006bed4743 100644
@@ -390,8 +390,7 @@ static int ci_min_max_v_gnbl_pm_lid_from_bapm_vddc(struct radeon_device *rdev)
 static int ci_populate_bapm_vddc_base_leakage_sidd(struct radeon_device *rdev)
 {
        struct ci_power_info *pi = ci_get_pi(rdev);
-       u16 hi_sidd = pi->smc_powertune_table.BapmVddCBaseLeakageHiSidd;
-       u16 lo_sidd = pi->smc_powertune_table.BapmVddCBaseLeakageLoSidd;
+       u16 hi_sidd, lo_sidd;
        struct radeon_cac_tdp_table *cac_tdp_table =
                rdev->pm.dpm.dyn_state.cac_tdp_table;
 
--

2.32.0