2022-05-24 09:03:44

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] drm/msm/dpu: Remove unused code

Eliminate the follow clang warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:544:33: warning: variable
‘mode’ set but not used [-Wunused-but-set-variable].

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 52516eb20cb8..658171799b9a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -541,7 +541,6 @@ static int dpu_encoder_virt_atomic_check(
struct dpu_encoder_virt *dpu_enc;
struct msm_drm_private *priv;
struct dpu_kms *dpu_kms;
- const struct drm_display_mode *mode;
struct drm_display_mode *adj_mode;
struct msm_display_topology topology;
struct dpu_global_state *global_state;
@@ -559,7 +558,6 @@ static int dpu_encoder_virt_atomic_check(

priv = drm_enc->dev->dev_private;
dpu_kms = to_dpu_kms(priv->kms);
- mode = &crtc_state->mode;
adj_mode = &crtc_state->adjusted_mode;
global_state = dpu_kms_get_global_state(crtc_state->state);
if (IS_ERR(global_state))
--
2.20.1.7.g153144c



2022-06-01 16:23:07

by Abhinav Kumar

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dpu: Remove unused code



On 5/24/2022 1:14 AM, Jiapeng Chong wrote:
> Eliminate the follow clang warning:
>
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:544:33: warning: variable
> ‘mode’ set but not used [-Wunused-but-set-variable].
>
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>

Fixes: 3177589c6e93("drm/msm/dpu: encoder: drop unused mode_fixup callback")

Reviewed-by: Abhinav Kumar <[email protected]>

> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> index 52516eb20cb8..658171799b9a 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> @@ -541,7 +541,6 @@ static int dpu_encoder_virt_atomic_check(
> struct dpu_encoder_virt *dpu_enc;
> struct msm_drm_private *priv;
> struct dpu_kms *dpu_kms;
> - const struct drm_display_mode *mode;
> struct drm_display_mode *adj_mode;
> struct msm_display_topology topology;
> struct dpu_global_state *global_state;
> @@ -559,7 +558,6 @@ static int dpu_encoder_virt_atomic_check(
>
> priv = drm_enc->dev->dev_private;
> dpu_kms = to_dpu_kms(priv->kms);
> - mode = &crtc_state->mode;
> adj_mode = &crtc_state->adjusted_mode;
> global_state = dpu_kms_get_global_state(crtc_state->state);
> if (IS_ERR(global_state))