Skip to contentSkip to conversation

drm/msm/dpu: remove unused variable cmd_enc

PATCH In review Austin Kim 1 participant 2 messages May 21, 2021 – May 27, 2021

Subsystems (3)
lore
Share & tools
lore

Austin Kim

author
#0 lore raw

PATCH 1/1 drm/msm/dpu: remove unused variable cmd_enc

After the call to to_dpu_encoder_phys_cmd() is made,
'cmd_enc' is not used. Where to_dpu_encoder_phys_cmd() is simply replaced with container_of(x, struct dpu_encoder_phys_cmd, base) by compiler.

So it had better remove W=1 kernel build warning(s):

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function
‘dpu_encoder_phys_cmd_wait_for_commit_done’:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:688:31: warning:
variable ‘cmd_enc’ set but not used

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +0 -4
index b2be39b9144e..088900841bf8 100644
@@ -685,10 +685,6 @@ static int dpu_encoder_phys_cmd_wait_for_tx_complete(
 static int dpu_encoder_phys_cmd_wait_for_commit_done(
 		struct dpu_encoder_phys *phys_enc)
 {
-	struct dpu_encoder_phys_cmd *cmd_enc;
-
-	cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
-
 	/* only required for master controller */
 	if (!dpu_encoder_phys_cmd_is_master(phys_enc))
 		return 0;
Signature · 1 line
2.20.1
author
#1 lore raw

2021년 5월 21일 (금) 오후 1:16, Austin Kim <[email protected]>님이 작성:

Quoted 33 lines

After the call to to_dpu_encoder_phys_cmd() is made,
'cmd_enc' is not used. Where to_dpu_encoder_phys_cmd() is simply replaced with container_of(x, struct dpu_encoder_phys_cmd, base) by compiler.

So it had better remove W=1 kernel build warning(s):

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function
‘dpu_encoder_phys_cmd_wait_for_commit_done’:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:688:31: warning:
variable ‘cmd_enc’ set but not used

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +0 -5
index b2be39b9144e..088900841bf8 100644
@@ -685,10 +685,6 @@ static int dpu_encoder_phys_cmd_wait_for_tx_complete(
 static int dpu_encoder_phys_cmd_wait_for_commit_done(
                struct dpu_encoder_phys *phys_enc)
 {
-       struct dpu_encoder_phys_cmd *cmd_enc;
-
-       cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
-
        /* only required for master controller */
        if (!dpu_encoder_phys_cmd_is_master(phys_enc))
                return 0;
--
Quoted 2 lines

2.20.1

If you are available, would you please review this patch.

BR,
Austin Kim