[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR12MB334491A28234DD9F23CA8843E4D40@MN2PR12MB3344.namprd12.prod.outlook.com>
Date: Wed, 7 Aug 2019 02:57:02 +0000
From: "Quan, Evan" <Evan.Quan@....com>
To: Colin King <colin.king@...onical.com>, Rex Zhu <rex.zhu@....com>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"Koenig, Christian" <Christian.Koenig@....com>,
"Zhou, David(ChunMing)" <David1.Zhou@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH][drm-next] drm/amd/powerplay: remove redundant duplicated
return check
Thanks! Reviewed-by: Evan Quan <evan.quan@....com>
> -----Original Message-----
> From: Colin King <colin.king@...onical.com>
> Sent: Monday, August 05, 2019 6:30 PM
> To: Rex Zhu <rex.zhu@....com>; Quan, Evan <Evan.Quan@....com>;
> Deucher, Alexander <Alexander.Deucher@....com>; Koenig, Christian
> <Christian.Koenig@....com>; Zhou, David(ChunMing)
> <David1.Zhou@....com>; David Airlie <airlied@...ux.ie>; Daniel Vetter
> <daniel@...ll.ch>; amd-gfx@...ts.freedesktop.org; dri-
> devel@...ts.freedesktop.org
> Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH][drm-next] drm/amd/powerplay: remove redundant
> duplicated return check
>
> From: Colin Ian King <colin.king@...onical.com>
>
> The check on ret is duplicated in two places, it is redundant code.
> Remove it.
>
> Addresses-Coverity: ("Logically dead code")
> Fixes: b94afb61cdae ("drm/amd/powerplay: honor hw limit on fetching
> metrics data for navi10")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
> drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
> b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
> index d62c2784b102..b272c8dc8f79 100644
> --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
> +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
> @@ -941,8 +941,6 @@ static int navi10_get_gpu_power(struct smu_context
> *smu, uint32_t *value)
> ret = navi10_get_metrics_table(smu, &metrics);
> if (ret)
> return ret;
> - if (ret)
> - return ret;
>
> *value = metrics.AverageSocketPower << 8;
>
> @@ -1001,8 +999,6 @@ static int navi10_get_fan_speed_rpm(struct
> smu_context *smu,
> ret = navi10_get_metrics_table(smu, &metrics);
> if (ret)
> return ret;
> - if (ret)
> - return ret;
>
> *speed = metrics.CurrFanSpeed;
>
> --
> 2.20.1
Powered by blists - more mailing lists