[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_OsUSP0OXWfB4=XfLuHmDMtPDyWY7EwbMPGEbz3+mi=SQ@mail.gmail.com>
Date: Wed, 2 Oct 2019 09:39:28 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Austin Kim <austindh.kim@...il.com>
Cc: "Deucher, Alexander" <alexander.deucher@....com>,
"Quan, Evan" <evan.quan@....com>,
Christian Koenig <christian.koenig@....com>,
Chunming Zhou <David1.Zhou@....com>,
Dave Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
amd-gfx list <amd-gfx@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: Drop unused variable and statement
On Wed, Oct 2, 2019 at 3:19 AM Austin Kim <austindh.kim@...il.com> wrote:
>
> Even though 'smu8_smu' is declared, it is not used after below statement.
>
> smu8_smu = hwmgr->smu_backend;
>
> So 'unused variable' could be safely removed
> to stop warning message as below:
>
> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smu8_smumgr.c:180:22:
> warning: variable ‘smu8_smu’ set but not used
> [-Wunused-but-set-variable]
>
> struct smu8_smumgr *smu8_smu;
> ^
> Signed-off-by: Austin Kim <austindh.kim@...il.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> index 4728aa2..7dca04a 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
> @@ -177,12 +177,10 @@ static int smu8_load_mec_firmware(struct pp_hwmgr *hwmgr)
> uint32_t tmp;
> int ret = 0;
> struct cgs_firmware_info info = {0};
> - struct smu8_smumgr *smu8_smu;
>
> if (hwmgr == NULL || hwmgr->device == NULL)
> return -EINVAL;
>
> - smu8_smu = hwmgr->smu_backend;
> ret = cgs_get_firmware_info(hwmgr->device,
> CGS_UCODE_ID_CP_MEC, &info);
>
> --
> 2.6.2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists