drm/amd/display: Remove set but not used variables 'h_ratio_chroma', 'v_ratio_chroma'
authorzhengbin <zhengbin13@huawei.com>
Sat, 5 Oct 2019 02:44:34 +0000 (10:44 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Oct 2019 20:10:43 +0000 (15:10 -0500)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c: In function dwb_program_horz_scalar:
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c:725:11: warning: variable h_ratio_chroma set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c: In function dwb_program_vert_scalar:
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c:806:11: warning: variable v_ratio_chroma set but not used [-Wunused-but-set-variable]

They are not used since commit 345429a67c48 ("drm/amd/display:
Add DCN2 DWB")

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c

index cd8bc92ce3ba9e4b88fee7f28a28c5c6c8eac778..880954ac0b02748e58e2b3548adf0d880f74f22c 100644 (file)
@@ -722,7 +722,6 @@ bool dwb_program_horz_scalar(struct dcn20_dwbc *dwbc20,
                struct scaling_taps num_taps)
 {
        uint32_t h_ratio_luma = 1;
-       uint32_t h_ratio_chroma = 1;
        uint32_t h_taps_luma = num_taps.h_taps;
        uint32_t h_taps_chroma = num_taps.h_taps_c;
        int32_t h_init_phase_luma = 0;
@@ -747,7 +746,6 @@ bool dwb_program_horz_scalar(struct dcn20_dwbc *dwbc20,
                h_ratio_luma = -1;
        else
                h_ratio_luma = dc_fixpt_u3d19(tmp_h_ratio_luma) << 5;
-       h_ratio_chroma = h_ratio_luma * 2;
 
        /*Program ratio*/
        REG_UPDATE(WBSCL_HORZ_FILTER_SCALE_RATIO, WBSCL_H_SCALE_RATIO, h_ratio_luma);
@@ -803,7 +801,6 @@ bool dwb_program_vert_scalar(struct dcn20_dwbc *dwbc20,
                enum dwb_subsample_position subsample_position)
 {
        uint32_t v_ratio_luma = 1;
-       uint32_t v_ratio_chroma = 1;
        uint32_t v_taps_luma = num_taps.v_taps;
        uint32_t v_taps_chroma = num_taps.v_taps_c;
        int32_t v_init_phase_luma = 0;
@@ -827,7 +824,6 @@ bool dwb_program_vert_scalar(struct dcn20_dwbc *dwbc20,
                v_ratio_luma = -1;
        else
                v_ratio_luma = dc_fixpt_u3d19(tmp_v_ratio_luma) << 5;
-       v_ratio_chroma = v_ratio_luma * 2;
 
        /*Program ratio*/
        REG_UPDATE(WBSCL_VERT_FILTER_SCALE_RATIO, WBSCL_V_SCALE_RATIO, v_ratio_luma);