2023-12-15 07:03:18

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] drm/rockchip: vop2: Remove the unused variable if_dclk_rate

Variable if_dclk_rate is not effectively used, so delete it.

drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:1688:16: warning: variable ‘if_dclk_rate’ set but not used.

Reported-by: Abaci Robot <[email protected]>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7750
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index 44508c2dd614..b4e7cddaf25a 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -1685,13 +1685,11 @@ static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id,
unsigned long dclk_core_rate = v_pixclk >> 2;
unsigned long dclk_rate = v_pixclk;
unsigned long dclk_out_rate;
- unsigned long if_dclk_rate;
unsigned long if_pixclk_rate;
int K = 1;

if (vop2_output_if_is_hdmi(id)) {
/*
- * K = 2: dclk_core = if_pixclk_rate > if_dclk_rate
* K = 1: dclk_core = hdmie_edp_dclk > if_pixclk_rate
*/
if (output_mode == ROCKCHIP_OUT_MODE_YUV420) {
@@ -1700,10 +1698,8 @@ static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id,
}

if_pixclk_rate = (dclk_core_rate << 1) / K;
- if_dclk_rate = dclk_core_rate / K;
/*
* *if_pixclk_div = dclk_rate / if_pixclk_rate;
- * *if_dclk_div = dclk_rate / if_dclk_rate;
*/
*if_pixclk_div = 2;
*if_dclk_div = 4;
--
2.20.1.7.g153144c