[PATCH][next] drm/amd/pp: remove redundant pointer internal_buf

Zhu, Rex Rex.Zhu at amd.com
Wed Mar 14 11:52:26 UTC 2018


Apply it and thanks.


Best Regards

Rex




________________________________
From: Colin King <colin.king at canonical.com>
Sent: Tuesday, March 13, 2018 9:22 PM
To: Deucher, Alexander; Koenig, Christian; Zhou, David(ChunMing); David Airlie; Zhu, Rex; amd-gfx at lists.freedesktop.org; dri-devel at lists.freedesktop.org
Cc: kernel-janitors at vger.kernel.org; linux-kernel at vger.kernel.org
Subject: [PATCH][next] drm/amd/pp: remove redundant pointer internal_buf

From: Colin Ian King <colin.king at canonical.com>

The pointer internal_buf is assigned a value but the pointer is never
read, hence it is redundant and can be removed.

Cleans up clang warning:
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smu7_smumgr.c:630:2:
warning: Value stored to 'internal_buf' is never read

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
index 7394bb46b8b2..dcb151cabc00 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
@@ -585,7 +585,6 @@ int smu7_setup_pwr_virus(struct pp_hwmgr *hwmgr)
 int smu7_init(struct pp_hwmgr *hwmgr)
 {
         struct smu7_smumgr *smu_data;
-       uint8_t *internal_buf;
         uint64_t mc_addr = 0;
         int r;
         /* Allocate memory for backend private data */
@@ -627,7 +626,6 @@ int smu7_init(struct pp_hwmgr *hwmgr)
                                         &smu_data->header_buffer.kaddr);
                 return -EINVAL;
         }
-       internal_buf = smu_data->smu_buffer.kaddr;
         smu_data->smu_buffer.mc_addr = mc_addr;

         if (smum_is_hw_avfs_present(hwmgr))
--
2.15.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180314/0e1a89c7/attachment.html>


More information about the amd-gfx mailing list