LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] drm/radeon/ci_dpm: Remove redundant initialization of variables hi_sidd, lo_sidd
@ 2021-09-07 11:09 Colin King
2021-09-07 17:05 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-09-07 11:09 UTC (permalink / raw)
To: Alex Deucher, Christian König, Xinhui.Pan, David Airlie,
Daniel Vetter, amd-gfx, dri-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/radeon/ci_dpm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
index f0cfb58da467..ac006bed4743 100644
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/radeon/ci_dpm: Remove redundant initialization of variables hi_sidd, lo_sidd
2021-09-07 11:09 [PATCH] drm/radeon/ci_dpm: Remove redundant initialization of variables hi_sidd, lo_sidd Colin King
@ 2021-09-07 17:05 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2021-09-07 17:05 UTC (permalink / raw)
To: Colin King
Cc: Alex Deucher, Christian König, xinhui pan, David Airlie,
Daniel Vetter, amd-gfx list, Maling list - DRI developers,
kernel-janitors, LKML
Applied. Thanks!
Alex
On Tue, Sep 7, 2021 at 7:09 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> 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")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/gpu/drm/radeon/ci_dpm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
> index f0cfb58da467..ac006bed4743 100644
> --- a/drivers/gpu/drm/radeon/ci_dpm.c
> +++ b/drivers/gpu/drm/radeon/ci_dpm.c
> @@ -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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-07 17:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 11:09 [PATCH] drm/radeon/ci_dpm: Remove redundant initialization of variables hi_sidd, lo_sidd Colin King
2021-09-07 17:05 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).