[PATCH 4/5] drm/rockchip: vop2: Drop redundant zero-init in setup_layer_mixer()

Andy Yan andy.yan at rock-chips.com
Mon Jun 1 03:46:41 PDT 2026


Hello,

On 5/5/26 02:24, Cristian Ciocaltea wrote:
> The layer_sel and atv_layer_sel local variables in
> rk3568_vop2_setup_layer_mixer() are unconditionally assigned from
> vop2->old_layer_sel and the RK3568_OVL_LAYER_SEL register read,
> respectively, before any use.
> 
> Remove the superfluous zero-initializers.
> 
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea at collabora.com>
   
    Reviewed-by: Andy Yan <andy.yan at rock-chips.com>


> ---
>   drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> index 1f5e8c2acecd..0849bd922ffb 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> @@ -2134,9 +2134,9 @@ static void rk3568_vop2_setup_layer_mixer(struct vop2_video_port *vp)
>   {
>   	struct vop2 *vop2 = vp->vop2;
>   	struct drm_plane *plane;
> -	u32 layer_sel = 0;
> +	u32 layer_sel;
>   	u32 port_sel;
> -	u32 atv_layer_sel = 0;
> +	u32 atv_layer_sel;
>   	u8 layer_id;
>   	u8 old_layer_id;
>   	u8 layer_sel_id;
> 




More information about the linux-arm-kernel mailing list