aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4594-drm-amd-powerplay-remove-redundant-assignment-to-var.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4594-drm-amd-powerplay-remove-redundant-assignment-to-var.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4594-drm-amd-powerplay-remove-redundant-assignment-to-var.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4594-drm-amd-powerplay-remove-redundant-assignment-to-var.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4594-drm-amd-powerplay-remove-redundant-assignment-to-var.patch
new file mode 100644
index 00000000..67733212
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4594-drm-amd-powerplay-remove-redundant-assignment-to-var.patch
@@ -0,0 +1,35 @@
+From bf8c2ee372d7c70161ef6f75da978bdaa925d9c0 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Fri, 22 Nov 2019 23:04:07 +0000
+Subject: [PATCH 4594/4736] drm/amd/powerplay: remove redundant assignment to
+ variables HiSidd and LoSidd
+
+The variables HiSidd and LoSidd are being initialized with values that
+are never read and are being updated a little later with a new value.
+The initialization is redundant and can be removed.
+
+Addresses-Coverity: ("Unused value")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c
+index edc5fba0f3e1..405bae2872b3 100644
+--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c
++++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c
+@@ -652,8 +652,8 @@ static int ci_min_max_v_gnbl_pm_lid_from_bapm_vddc(struct pp_hwmgr *hwmgr)
+ static int ci_populate_bapm_vddc_base_leakage_sidd(struct pp_hwmgr *hwmgr)
+ {
+ struct ci_smumgr *smu_data = (struct ci_smumgr *)(hwmgr->smu_backend);
+- uint16_t HiSidd = smu_data->power_tune_table.BapmVddCBaseLeakageHiSidd;
+- uint16_t LoSidd = smu_data->power_tune_table.BapmVddCBaseLeakageLoSidd;
++ uint16_t HiSidd;
++ uint16_t LoSidd;
+ struct phm_cac_tdp_table *cac_table = hwmgr->dyn_state.cac_dtp_table;
+
+ HiSidd = (uint16_t)(cac_table->usHighCACLeakage / 100 * 256);
+--
+2.17.1
+