[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190822103018.GB29026@arm.com>
Date: Thu, 22 Aug 2019 10:30:18 +0000
From: Ayan Halder <Ayan.Halder@....com>
To: "james qian wang (Arm Technology China)" <james.qian.wang@....com>
CC: Liviu Dudau <Liviu.Dudau@....com>,
"airlied@...ux.ie" <airlied@...ux.ie>,
Brian Starkey <Brian.Starkey@....com>,
"maarten.lankhorst@...ux.intel.com"
<maarten.lankhorst@...ux.intel.com>,
"sean@...rly.run" <sean@...rly.run>,
"Jonathan Chai (Arm Technology China)" <Jonathan.Chai@....com>,
"Julien Yin (Arm Technology China)" <Julien.Yin@....com>,
"Thomas Sun (Arm Technology China)" <thomas.Sun@....com>,
"Lowry Li (Arm Technology China)" <Lowry.Li@....com>,
"Tiannan Zhu (Arm Technology China)" <Tiannan.Zhu@....com>,
"Yiqi Kang (Arm Technology China)" <Yiqi.Kang@....com>,
nd <nd@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
Ben Davis <Ben.Davis@....com>,
"Oscar Zhang (Arm Technology China)" <Oscar.Zhang@....com>,
"Channing Chen (Arm Technology China)" <Channing.Chen@....com>
Subject: Re: [PATCH] drm/komeda: Fix warning -Wunused-but-set-variable
On Mon, Aug 12, 2019 at 11:23:41AM +0000, james qian wang (Arm Technology China) wrote:
> Fixed two -Wunused-but-set-variable warnings:
>
> /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c: In function ‘komeda_crtc_normalize_zpos’:
> /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c:150:26: warning: variable ‘fb’ set but not used [-Wunused-but-set-variable]
> struct drm_framebuffer *fb;
> ^~
> /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c: In function ‘komeda_kms_check’:
> /arm/linux/display/aosp-4.14-drm-next/drivers/gpu/drm/arm/display/komeda/komeda_kms.c:209:25: warning: variable ‘old_crtc_st’ set but not used [-Wunused-but-set-variable]
> struct drm_crtc_state *old_crtc_st, *new_crtc_st;
> ^~~~~~~~~~~
>
> Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@....com>
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> index d50e75f0b2bd..1f0e3f4e8d74 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
> @@ -147,7 +147,6 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc,
> struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(crtc_st);
> struct komeda_plane_state *kplane_st;
> struct drm_plane_state *plane_st;
> - struct drm_framebuffer *fb;
> struct drm_plane *plane;
> struct list_head zorder_list;
> int order = 0, err;
> @@ -173,7 +172,6 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc,
>
> list_for_each_entry(kplane_st, &zorder_list, zlist_node) {
> plane_st = &kplane_st->base;
> - fb = plane_st->fb;
> plane = plane_st->plane;
>
> plane_st->normalized_zpos = order++;
> @@ -206,7 +204,7 @@ static int komeda_kms_check(struct drm_device *dev,
> struct drm_atomic_state *state)
> {
> struct drm_crtc *crtc;
> - struct drm_crtc_state *old_crtc_st, *new_crtc_st;
> + struct drm_crtc_state *new_crtc_st;
> int i, err;
>
> err = drm_atomic_helper_check_modeset(dev, state);
> @@ -217,7 +215,7 @@ static int komeda_kms_check(struct drm_device *dev,
> * so need to add all affected_planes (even unchanged) to
> * drm_atomic_state.
> */
> - for_each_oldnew_crtc_in_state(state, crtc, old_crtc_st, new_crtc_st, i) {
> + for_each_new_crtc_in_state(state, crtc, new_crtc_st, i) {
> err = drm_atomic_add_affected_planes(state, crtc);
> if (err)
> return err;
> --
Looks good to me.
Reviewed-by: Ayan Kumar Halder <ayan.halder@....com>
> 2.20.1
>
Powered by blists - more mailing lists