drm/msm: dpu: Remove empty/useless labels
I noticed an empty label while driving by and decided to use coccinelle to see if there were any more. Here's the spatch and the invocation: --- @@ identifier lbl; expression E; @@ - goto lbl; + return E; ... - lbl: return E; @@ identifier lbl; @@ - goto lbl; + return; ... - lbl: - return; --- spatch --allow-inconsistent-paths --sp-file file.spatch --dir drivers/gpu/drm/msm/disp/dpu1 --in-place --- Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
58fba464ea
commit
0841851f3b
|
@ -68,7 +68,7 @@ static bool _dpu_core_video_mode_intf_connected(struct drm_crtc *crtc)
|
||||||
bool intf_connected = false;
|
bool intf_connected = false;
|
||||||
|
|
||||||
if (!crtc)
|
if (!crtc)
|
||||||
goto end;
|
return intf_connected;
|
||||||
|
|
||||||
drm_for_each_crtc(tmp_crtc, crtc->dev) {
|
drm_for_each_crtc(tmp_crtc, crtc->dev) {
|
||||||
if ((dpu_crtc_get_intf_mode(tmp_crtc) == INTF_MODE_VIDEO) &&
|
if ((dpu_crtc_get_intf_mode(tmp_crtc) == INTF_MODE_VIDEO) &&
|
||||||
|
@ -76,11 +76,10 @@ static bool _dpu_core_video_mode_intf_connected(struct drm_crtc *crtc)
|
||||||
DPU_DEBUG("video interface connected crtc:%d\n",
|
DPU_DEBUG("video interface connected crtc:%d\n",
|
||||||
tmp_crtc->base.id);
|
tmp_crtc->base.id);
|
||||||
intf_connected = true;
|
intf_connected = true;
|
||||||
goto end;
|
return intf_connected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
|
||||||
return intf_connected;
|
return intf_connected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -496,14 +496,11 @@ static void dpu_encoder_phys_cmd_enable_helper(
|
||||||
_dpu_encoder_phys_cmd_pingpong_config(phys_enc);
|
_dpu_encoder_phys_cmd_pingpong_config(phys_enc);
|
||||||
|
|
||||||
if (!dpu_encoder_phys_cmd_is_master(phys_enc))
|
if (!dpu_encoder_phys_cmd_is_master(phys_enc))
|
||||||
goto skip_flush;
|
return;
|
||||||
|
|
||||||
ctl = phys_enc->hw_ctl;
|
ctl = phys_enc->hw_ctl;
|
||||||
ctl->ops.get_bitmask_intf(ctl, &flush_mask, phys_enc->intf_idx);
|
ctl->ops.get_bitmask_intf(ctl, &flush_mask, phys_enc->intf_idx);
|
||||||
ctl->ops.update_pending_flush(ctl, flush_mask);
|
ctl->ops.update_pending_flush(ctl, flush_mask);
|
||||||
|
|
||||||
skip_flush:
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dpu_encoder_phys_cmd_enable(struct dpu_encoder_phys *phys_enc)
|
static void dpu_encoder_phys_cmd_enable(struct dpu_encoder_phys *phys_enc)
|
||||||
|
@ -797,7 +794,7 @@ struct dpu_encoder_phys *dpu_encoder_phys_cmd_init(
|
||||||
if (!cmd_enc) {
|
if (!cmd_enc) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
DPU_ERROR("failed to allocate\n");
|
DPU_ERROR("failed to allocate\n");
|
||||||
goto fail;
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
phys_enc = &cmd_enc->base;
|
phys_enc = &cmd_enc->base;
|
||||||
phys_enc->hw_mdptop = p->dpu_kms->hw_mdp;
|
phys_enc->hw_mdptop = p->dpu_kms->hw_mdp;
|
||||||
|
@ -855,6 +852,5 @@ struct dpu_encoder_phys *dpu_encoder_phys_cmd_init(
|
||||||
|
|
||||||
return phys_enc;
|
return phys_enc;
|
||||||
|
|
||||||
fail:
|
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
|
@ -921,7 +921,7 @@ static int _dpu_format_populate_addrs_ubwc(
|
||||||
+ layout->plane_size[2] + layout->plane_size[3];
|
+ layout->plane_size[2] + layout->plane_size[3];
|
||||||
|
|
||||||
if (!meta)
|
if (!meta)
|
||||||
goto done;
|
return 0;
|
||||||
|
|
||||||
/* configure Y metadata plane */
|
/* configure Y metadata plane */
|
||||||
layout->plane_addr[2] = base_addr;
|
layout->plane_addr[2] = base_addr;
|
||||||
|
@ -952,12 +952,11 @@ static int _dpu_format_populate_addrs_ubwc(
|
||||||
layout->plane_addr[1] = 0;
|
layout->plane_addr[1] = 0;
|
||||||
|
|
||||||
if (!meta)
|
if (!meta)
|
||||||
goto done;
|
return 0;
|
||||||
|
|
||||||
layout->plane_addr[2] = base_addr;
|
layout->plane_addr[2] = base_addr;
|
||||||
layout->plane_addr[3] = 0;
|
layout->plane_addr[3] = 0;
|
||||||
}
|
}
|
||||||
done:
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ static u32 dpu_hw_pp_get_line_count(struct dpu_hw_pingpong *pp)
|
||||||
height = DPU_REG_READ(c, PP_SYNC_CONFIG_HEIGHT) & 0xFFFF;
|
height = DPU_REG_READ(c, PP_SYNC_CONFIG_HEIGHT) & 0xFFFF;
|
||||||
|
|
||||||
if (height < init)
|
if (height < init)
|
||||||
goto line_count_exit;
|
return line;
|
||||||
|
|
||||||
line = DPU_REG_READ(c, PP_INT_COUNT_VAL) & 0xFFFF;
|
line = DPU_REG_READ(c, PP_INT_COUNT_VAL) & 0xFFFF;
|
||||||
|
|
||||||
|
@ -186,7 +186,6 @@ static u32 dpu_hw_pp_get_line_count(struct dpu_hw_pingpong *pp)
|
||||||
else
|
else
|
||||||
line -= init;
|
line -= init;
|
||||||
|
|
||||||
line_count_exit:
|
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -856,20 +856,20 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
|
||||||
|
|
||||||
if (!kms) {
|
if (!kms) {
|
||||||
DPU_ERROR("invalid kms\n");
|
DPU_ERROR("invalid kms\n");
|
||||||
goto end;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
dpu_kms = to_dpu_kms(kms);
|
dpu_kms = to_dpu_kms(kms);
|
||||||
dev = dpu_kms->dev;
|
dev = dpu_kms->dev;
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
DPU_ERROR("invalid device\n");
|
DPU_ERROR("invalid device\n");
|
||||||
goto end;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = dpu_dbg_init(&dpu_kms->pdev->dev);
|
rc = dpu_dbg_init(&dpu_kms->pdev->dev);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DRM_ERROR("failed to init dpu dbg: %d\n", rc);
|
DRM_ERROR("failed to init dpu dbg: %d\n", rc);
|
||||||
goto end;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv = dev->dev_private;
|
priv = dev->dev_private;
|
||||||
|
@ -1050,7 +1050,6 @@ error:
|
||||||
_dpu_kms_hw_destroy(dpu_kms);
|
_dpu_kms_hw_destroy(dpu_kms);
|
||||||
dbg_destroy:
|
dbg_destroy:
|
||||||
dpu_dbg_destroy();
|
dpu_dbg_destroy();
|
||||||
end:
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1155,7 +1154,7 @@ static int __maybe_unused dpu_runtime_suspend(struct device *dev)
|
||||||
ddev = dpu_kms->dev;
|
ddev = dpu_kms->dev;
|
||||||
if (!ddev) {
|
if (!ddev) {
|
||||||
DPU_ERROR("invalid drm_device\n");
|
DPU_ERROR("invalid drm_device\n");
|
||||||
goto exit;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = dpu_power_resource_enable(&dpu_kms->phandle,
|
rc = dpu_power_resource_enable(&dpu_kms->phandle,
|
||||||
|
@ -1167,7 +1166,6 @@ static int __maybe_unused dpu_runtime_suspend(struct device *dev)
|
||||||
if (rc)
|
if (rc)
|
||||||
DPU_ERROR("clock disable failed rc:%d\n", rc);
|
DPU_ERROR("clock disable failed rc:%d\n", rc);
|
||||||
|
|
||||||
exit:
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1182,13 +1180,13 @@ static int __maybe_unused dpu_runtime_resume(struct device *dev)
|
||||||
ddev = dpu_kms->dev;
|
ddev = dpu_kms->dev;
|
||||||
if (!ddev) {
|
if (!ddev) {
|
||||||
DPU_ERROR("invalid drm_device\n");
|
DPU_ERROR("invalid drm_device\n");
|
||||||
goto exit;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, true);
|
rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, true);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DPU_ERROR("clock enable failed rc:%d\n", rc);
|
DPU_ERROR("clock enable failed rc:%d\n", rc);
|
||||||
goto exit;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = dpu_power_resource_enable(&dpu_kms->phandle,
|
rc = dpu_power_resource_enable(&dpu_kms->phandle,
|
||||||
|
@ -1196,7 +1194,6 @@ static int __maybe_unused dpu_runtime_resume(struct device *dev)
|
||||||
if (rc)
|
if (rc)
|
||||||
DPU_ERROR("resource enable failed: %d\n", rc);
|
DPU_ERROR("resource enable failed: %d\n", rc);
|
||||||
|
|
||||||
exit:
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1537,7 +1537,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
|
||||||
if (!pdpu) {
|
if (!pdpu) {
|
||||||
DPU_ERROR("[%u]failed to allocate local plane struct\n", pipe);
|
DPU_ERROR("[%u]failed to allocate local plane struct\n", pipe);
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto exit;
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* cache local stuff for later */
|
/* cache local stuff for later */
|
||||||
|
@ -1623,6 +1623,5 @@ clean_sspp:
|
||||||
dpu_hw_sspp_destroy(pdpu->pipe_hw);
|
dpu_hw_sspp_destroy(pdpu->pipe_hw);
|
||||||
clean_plane:
|
clean_plane:
|
||||||
kfree(pdpu);
|
kfree(pdpu);
|
||||||
exit:
|
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,
|
||||||
ot_lim = _dpu_vbif_get_ot_limit(vbif, params) & 0xFF;
|
ot_lim = _dpu_vbif_get_ot_limit(vbif, params) & 0xFF;
|
||||||
|
|
||||||
if (ot_lim == 0)
|
if (ot_lim == 0)
|
||||||
goto exit;
|
return;
|
||||||
|
|
||||||
trace_dpu_perf_set_ot(params->num, params->xin_id, ot_lim,
|
trace_dpu_perf_set_ot(params->num, params->xin_id, ot_lim,
|
||||||
params->vbif_idx);
|
params->vbif_idx);
|
||||||
|
@ -210,8 +210,6 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,
|
||||||
|
|
||||||
if (forced_on)
|
if (forced_on)
|
||||||
mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, false);
|
mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, false);
|
||||||
exit:
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
|
void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
|
||||||
|
|
Loading…
Reference in a new issue