Commit 60b42f2a authored by zhengbin's avatar zhengbin Committed by Rob Clark

drm/msm/dpu: Remove set but not used variables 'cmd_enc', 'priv'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function dpu_encoder_phys_cmd_ctl_start_irq:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:136:31: warning: variable cmd_enc set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function dpu_encoder_phys_cmd_irq_control:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:328:31: warning: variable cmd_enc set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function dpu_encoder_phys_cmd_tearcheck_config:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:367:26: warning: variable priv set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function dpu_encoder_phys_cmd_wait_for_tx_complete:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:662:31: warning: variable cmd_enc set but not used [-Wunused-but-set-variable]

They are not used since commit 25fdd593 ("drm/msm:
Add SDM845 DPU support")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarzhengbin <zhengbin13@huawei.com>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent f09662c1
...@@ -124,13 +124,11 @@ static void dpu_encoder_phys_cmd_pp_rd_ptr_irq(void *arg, int irq_idx) ...@@ -124,13 +124,11 @@ static void dpu_encoder_phys_cmd_pp_rd_ptr_irq(void *arg, int irq_idx)
static void dpu_encoder_phys_cmd_ctl_start_irq(void *arg, int irq_idx) static void dpu_encoder_phys_cmd_ctl_start_irq(void *arg, int irq_idx)
{ {
struct dpu_encoder_phys *phys_enc = arg; struct dpu_encoder_phys *phys_enc = arg;
struct dpu_encoder_phys_cmd *cmd_enc;
if (!phys_enc || !phys_enc->hw_ctl) if (!phys_enc || !phys_enc->hw_ctl)
return; return;
DPU_ATRACE_BEGIN("ctl_start_irq"); DPU_ATRACE_BEGIN("ctl_start_irq");
cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
atomic_add_unless(&phys_enc->pending_ctlstart_cnt, -1, 0); atomic_add_unless(&phys_enc->pending_ctlstart_cnt, -1, 0);
...@@ -316,13 +314,9 @@ static int dpu_encoder_phys_cmd_control_vblank_irq( ...@@ -316,13 +314,9 @@ static int dpu_encoder_phys_cmd_control_vblank_irq(
static void dpu_encoder_phys_cmd_irq_control(struct dpu_encoder_phys *phys_enc, static void dpu_encoder_phys_cmd_irq_control(struct dpu_encoder_phys *phys_enc,
bool enable) bool enable)
{ {
struct dpu_encoder_phys_cmd *cmd_enc;
if (!phys_enc) if (!phys_enc)
return; return;
cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
trace_dpu_enc_phys_cmd_irq_ctrl(DRMID(phys_enc->parent), trace_dpu_enc_phys_cmd_irq_ctrl(DRMID(phys_enc->parent),
phys_enc->hw_pp->idx - PINGPONG_0, phys_enc->hw_pp->idx - PINGPONG_0,
enable, atomic_read(&phys_enc->vblank_refcount)); enable, atomic_read(&phys_enc->vblank_refcount));
...@@ -355,7 +349,6 @@ static void dpu_encoder_phys_cmd_tearcheck_config( ...@@ -355,7 +349,6 @@ static void dpu_encoder_phys_cmd_tearcheck_config(
struct drm_display_mode *mode; struct drm_display_mode *mode;
bool tc_enable = true; bool tc_enable = true;
u32 vsync_hz; u32 vsync_hz;
struct msm_drm_private *priv;
struct dpu_kms *dpu_kms; struct dpu_kms *dpu_kms;
if (!phys_enc || !phys_enc->hw_pp) { if (!phys_enc || !phys_enc->hw_pp) {
...@@ -373,7 +366,6 @@ static void dpu_encoder_phys_cmd_tearcheck_config( ...@@ -373,7 +366,6 @@ static void dpu_encoder_phys_cmd_tearcheck_config(
} }
dpu_kms = phys_enc->dpu_kms; dpu_kms = phys_enc->dpu_kms;
priv = dpu_kms->dev->dev_private;
/* /*
* TE default: dsi byte clock calculated base on 70 fps; * TE default: dsi byte clock calculated base on 70 fps;
...@@ -646,13 +638,10 @@ static int dpu_encoder_phys_cmd_wait_for_tx_complete( ...@@ -646,13 +638,10 @@ static int dpu_encoder_phys_cmd_wait_for_tx_complete(
struct dpu_encoder_phys *phys_enc) struct dpu_encoder_phys *phys_enc)
{ {
int rc; int rc;
struct dpu_encoder_phys_cmd *cmd_enc;
if (!phys_enc) if (!phys_enc)
return -EINVAL; return -EINVAL;
cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
rc = _dpu_encoder_phys_cmd_wait_for_idle(phys_enc); rc = _dpu_encoder_phys_cmd_wait_for_idle(phys_enc);
if (rc) { if (rc) {
DRM_ERROR("failed wait_for_idle: id:%u ret:%d intf:%d\n", DRM_ERROR("failed wait_for_idle: id:%u ret:%d intf:%d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment