diff mbox series

[28/40] drm/amd/display/dc/dce/dce_transform: Remove 3 unused/legacy variables

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

Commit Message

Lee Jones Jan. 8, 2021, 8:14 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c: In function ‘dce60_transform_set_scaler’:
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:496:7: warning: variable ‘filter_updated’ set but not used [-Wunused-but-set-variable]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c: In function ‘dce60_transform_set_pixel_storage_depth’:
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:1040:19: warning: variable ‘expan_mode’ set but not used [-Wunused-but-set-variable]
 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:1040:6: warning: variable ‘pixel_depth’ set but not used [-Wunused-but-set-variable]

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
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: Mauro Rossi <issor.oruam@gmail.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 13 -------------
 1 file changed, 13 deletions(-)

Comments

Alex Deucher Jan. 8, 2021, 9:17 p.m. UTC | #1
On Fri, Jan 8, 2021 at 3:15 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c: In function ‘dce60_transform_set_scaler’:
>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:496:7: warning: variable ‘filter_updated’ set but not used [-Wunused-but-set-variable]
>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c: In function ‘dce60_transform_set_pixel_storage_depth’:
>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:1040:19: warning: variable ‘expan_mode’ set but not used [-Wunused-but-set-variable]
>  drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.c:1040:6: warning: variable ‘pixel_depth’ set but not used [-Wunused-but-set-variable]
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Leo Li <sunpeng.li@amd.com>
> 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: Mauro Rossi <issor.oruam@gmail.com>
> 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/amd/display/dc/dce/dce_transform.c | 13 -------------
>  1 file changed, 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c
> index 130a0a0c83329..6121bb7b009b8 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c
> @@ -493,7 +493,6 @@ static void dce60_transform_set_scaler(
>  {
>         struct dce_transform *xfm_dce = TO_DCE_TRANSFORM(xfm);
>         bool is_scaling_required;
> -       bool filter_updated = false;
>         const uint16_t *coeffs_v, *coeffs_h;
>
>         /*Use whole line buffer memory always*/
> @@ -558,7 +557,6 @@ static void dce60_transform_set_scaler(
>
>                         xfm_dce->filter_v = coeffs_v;
>                         xfm_dce->filter_h = coeffs_h;
> -                       filter_updated = true;
>                 }
>         }
>
> @@ -1037,34 +1035,23 @@ static void dce60_transform_set_pixel_storage_depth(
>         const struct bit_depth_reduction_params *bit_depth_params)
>  {
>         struct dce_transform *xfm_dce = TO_DCE_TRANSFORM(xfm);
> -       int pixel_depth, expan_mode;
>         enum dc_color_depth color_depth;
>
>         switch (depth) {
>         case LB_PIXEL_DEPTH_18BPP:
>                 color_depth = COLOR_DEPTH_666;
> -               pixel_depth = 2;
> -               expan_mode  = 1;
>                 break;
>         case LB_PIXEL_DEPTH_24BPP:
>                 color_depth = COLOR_DEPTH_888;
> -               pixel_depth = 1;
> -               expan_mode  = 1;
>                 break;
>         case LB_PIXEL_DEPTH_30BPP:
>                 color_depth = COLOR_DEPTH_101010;
> -               pixel_depth = 0;
> -               expan_mode  = 1;
>                 break;
>         case LB_PIXEL_DEPTH_36BPP:
>                 color_depth = COLOR_DEPTH_121212;
> -               pixel_depth = 3;
> -               expan_mode  = 0;
>                 break;
>         default:
>                 color_depth = COLOR_DEPTH_101010;
> -               pixel_depth = 0;
> -               expan_mode  = 1;
>                 BREAK_TO_DEBUGGER();
>                 break;
>         }
> --
> 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/amd/display/dc/dce/dce_transform.c b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c
index 130a0a0c83329..6121bb7b009b8 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_transform.c
@@ -493,7 +493,6 @@  static void dce60_transform_set_scaler(
 {
 	struct dce_transform *xfm_dce = TO_DCE_TRANSFORM(xfm);
 	bool is_scaling_required;
-	bool filter_updated = false;
 	const uint16_t *coeffs_v, *coeffs_h;
 
 	/*Use whole line buffer memory always*/
@@ -558,7 +557,6 @@  static void dce60_transform_set_scaler(
 
 			xfm_dce->filter_v = coeffs_v;
 			xfm_dce->filter_h = coeffs_h;
-			filter_updated = true;
 		}
 	}
 
@@ -1037,34 +1035,23 @@  static void dce60_transform_set_pixel_storage_depth(
 	const struct bit_depth_reduction_params *bit_depth_params)
 {
 	struct dce_transform *xfm_dce = TO_DCE_TRANSFORM(xfm);
-	int pixel_depth, expan_mode;
 	enum dc_color_depth color_depth;
 
 	switch (depth) {
 	case LB_PIXEL_DEPTH_18BPP:
 		color_depth = COLOR_DEPTH_666;
-		pixel_depth = 2;
-		expan_mode  = 1;
 		break;
 	case LB_PIXEL_DEPTH_24BPP:
 		color_depth = COLOR_DEPTH_888;
-		pixel_depth = 1;
-		expan_mode  = 1;
 		break;
 	case LB_PIXEL_DEPTH_30BPP:
 		color_depth = COLOR_DEPTH_101010;
-		pixel_depth = 0;
-		expan_mode  = 1;
 		break;
 	case LB_PIXEL_DEPTH_36BPP:
 		color_depth = COLOR_DEPTH_121212;
-		pixel_depth = 3;
-		expan_mode  = 0;
 		break;
 	default:
 		color_depth = COLOR_DEPTH_101010;
-		pixel_depth = 0;
-		expan_mode  = 1;
 		BREAK_TO_DEBUGGER();
 		break;
 	}