* [PATCH] drm/amdgpu: Drop unused variable and statement
@ 2019-10-02 5:17 Austin Kim
2019-10-02 13:39 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Austin Kim @ 2019-10-02 5:17 UTC (permalink / raw)
To: alexander.deucher, evan.quan, christian.koenig, David1.Zhou,
airlied, daniel
Cc: amd-gfx, dri-devel, linux-kernel, austindh.kim
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: Drop unused variable and statement
2019-10-02 5:17 [PATCH] drm/amdgpu: Drop unused variable and statement Austin Kim
@ 2019-10-02 13:39 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2019-10-02 13:39 UTC (permalink / raw)
To: Austin Kim
Cc: Chunming Zhou, Dave Airlie, LKML, Maling list - DRI developers,
amd-gfx list, Daniel Vetter, Deucher, Alexander, Quan, Evan,
Christian Koenig
On Wed, Oct 2, 2019 at 3:19 AM Austin Kim <austindh.kim@gmail.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@gmail.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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-02 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 5:17 [PATCH] drm/amdgpu: Drop unused variable and statement Austin Kim
2019-10-02 13:39 ` 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).