[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190723091200.GV15868@phenom.ffwll.local>
Date: Tue, 23 Jul 2019 11:12:00 +0200
From: Daniel Vetter <daniel@...ll.ch>
To: YueHaibing <yuehaibing@...wei.com>
Cc: james.qian.wang@....com, liviu.dudau@....com,
brian.starkey@....com, airlied@...ux.ie,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
daniel@...ll.ch
Subject: Re: [PATCH v2 -next] drm/komeda: remove set but not used variable
'old'
On Mon, Jul 22, 2019 at 01:56:27PM +0800, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/arm/display/komeda/komeda_plane.c:
> In function komeda_plane_atomic_duplicate_state:
> drivers/gpu/drm/arm/display/komeda/komeda_plane.c:161:35:
> warning: variable old set but not used [-Wunused-but-set-variable
>
> It is not used since commit 990dee3aa456 ("drm/komeda:
> Computing image enhancer internally")
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
> v2: fix compile err
Ok this one worked, applied.
Thanks, Daniel
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> index c095af1..98e915e 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> @@ -158,7 +158,7 @@ static void komeda_plane_reset(struct drm_plane *plane)
> static struct drm_plane_state *
> komeda_plane_atomic_duplicate_state(struct drm_plane *plane)
> {
> - struct komeda_plane_state *new, *old;
> + struct komeda_plane_state *new;
>
> if (WARN_ON(!plane->state))
> return NULL;
> @@ -169,8 +169,6 @@ komeda_plane_atomic_duplicate_state(struct drm_plane *plane)
>
> __drm_atomic_helper_plane_duplicate_state(plane, &new->base);
>
> - old = to_kplane_st(plane->state);
> -
> return &new->base;
> }
>
> --
> 2.7.4
>
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Powered by blists - more mailing lists