diff mbox series

[02/30] drm/radeon/evergreen: Remove set but unused variable 'mc_shared_chmap'

Message ID 20201110193112.988999-3-lee.jones@linaro.org
State Accepted
Commit ca648e3835d64e39518aa4058c8adc6d28d780a0
Headers show
Series Rid W=1 warnings from GPU | expand

Commit Message

Lee Jones Nov. 10, 2020, 7:30 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/radeon/evergreen.c: In function ‘evergreen_gpu_init’:
 drivers/gpu/drm/radeon/evergreen.c:3135:6: warning: variable ‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/radeon/evergreen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Deucher Nov. 10, 2020, 10:50 p.m. UTC | #1
On Tue, Nov 10, 2020 at 2:31 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/radeon/evergreen.c: In function ‘evergreen_gpu_init’:
>  drivers/gpu/drm/radeon/evergreen.c:3135:6: warning: variable ‘mc_shared_chmap’ set but not used [-Wunused-but-set-variable]
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Applied.  Thanks!

Alex


> ---
>  drivers/gpu/drm/radeon/evergreen.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index c9a9a87959f9e..efb19c445e48f 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -3135,7 +3135,7 @@ static int evergreen_cp_resume(struct radeon_device *rdev)
>  static void evergreen_gpu_init(struct radeon_device *rdev)
>  {
>         u32 gb_addr_config;
> -       u32 mc_shared_chmap, mc_arb_ramcfg;
> +       u32 mc_arb_ramcfg;
>         u32 sx_debug_1;
>         u32 smx_dc_ctl0;
>         u32 sq_config;
> @@ -3399,7 +3399,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev)
>
>         evergreen_fix_pci_max_read_req_size(rdev);
>
> -       mc_shared_chmap = RREG32(MC_SHARED_CHMAP);
> +       RREG32(MC_SHARED_CHMAP);
>         if ((rdev->family == CHIP_PALM) ||
>             (rdev->family == CHIP_SUMO) ||
>             (rdev->family == CHIP_SUMO2))
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index c9a9a87959f9e..efb19c445e48f 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -3135,7 +3135,7 @@  static int evergreen_cp_resume(struct radeon_device *rdev)
 static void evergreen_gpu_init(struct radeon_device *rdev)
 {
 	u32 gb_addr_config;
-	u32 mc_shared_chmap, mc_arb_ramcfg;
+	u32 mc_arb_ramcfg;
 	u32 sx_debug_1;
 	u32 smx_dc_ctl0;
 	u32 sq_config;
@@ -3399,7 +3399,7 @@  static void evergreen_gpu_init(struct radeon_device *rdev)
 
 	evergreen_fix_pci_max_read_req_size(rdev);
 
-	mc_shared_chmap = RREG32(MC_SHARED_CHMAP);
+	RREG32(MC_SHARED_CHMAP);
 	if ((rdev->family == CHIP_PALM) ||
 	    (rdev->family == CHIP_SUMO) ||
 	    (rdev->family == CHIP_SUMO2))