linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: <james.qian.wang@arm.com>, <liviu.dudau@arm.com>,
	<brian.starkey@arm.com>, <airlied@linux.ie>
Cc: <linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	<daniel@ffwll.ch>, YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH v2 -next] drm/komeda: remove set but not used variable 'old'
Date: Mon, 22 Jul 2019 13:56:27 +0800	[thread overview]
Message-ID: <20190722055627.38008-1-yuehaibing@huawei.com> (raw)
In-Reply-To: <20190709135808.56388-1-yuehaibing@huawei.com>

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@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: fix compile err
---
 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



  parent reply	other threads:[~2019-07-22  5:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 13:58 [PATCH -next] drm/komeda: remove set but not used variable 'old' YueHaibing
2019-07-18 18:51 ` Daniel Vetter
2019-07-19 13:04   ` Daniel Vetter
2019-07-22  1:44     ` Yuehaibing
2019-07-22  5:56 ` YueHaibing [this message]
2019-07-23  9:12   ` [PATCH v2 " Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190722055627.38008-1-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=airlied@linux.ie \
    --cc=brian.starkey@arm.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=james.qian.wang@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).