mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org
Cc: "Christian K?nig" <christian.koenig@amd.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Alexander Deucher" <Alexander.Deucher@amd.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Edward O'Callaghan" <funfunctor@folklore1984.net>,
	"Emily Deng" <Emily.Deng@amd.com>,
	"Tom St Denis" <tom.stdenis@amd.com>,
	"Eric Huang" <JinHuiEric.Huang@amd.com>,
	linux-kernel@vger.kernel.org, "Huang Rui" <ray.huang@amd.com>,
	"Chunming Zhou" <David1.Zhou@amd.com>,
	"Michel Dänzer" <michel.daenzer@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Monk Liu" <Monk.Liu@amd.com>, "Flora Cui" <Flora.Cui@amd.com>
Subject: [PATCH v2 1/5] drm/amdgpu: squash lines for simple wrapper functions
Date: Wed, 14 Sep 2016 23:39:08 +0900	[thread overview]
Message-ID: <1473863952-7658-2-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1473863952-7658-1-git-send-email-yamada.masahiro@socionext.com>

Remove unneeded variables and assignments.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 6 +-----
 drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c   | 6 +-----
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c   | 6 +-----
 3 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
index 00663a7..619b604 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
@@ -466,11 +466,7 @@ static int dce_virtual_suspend(void *handle)
 
 static int dce_virtual_resume(void *handle)
 {
-	int ret;
-
-	ret = dce_virtual_hw_init(handle);
-
-	return ret;
+	return dce_virtual_hw_init(handle);
 }
 
 static bool dce_virtual_is_idle(void *handle)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index 2b10e88..3d01291 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@ -190,12 +190,8 @@ static int sdma_v2_4_init_microcode(struct amdgpu_device *adev)
  */
 static uint32_t sdma_v2_4_ring_get_rptr(struct amdgpu_ring *ring)
 {
-	u32 rptr;
-
 	/* XXX check if swapping is necessary on BE */
-	rptr = ring->adev->wb.wb[ring->rptr_offs] >> 2;
-
-	return rptr;
+	return ring->adev->wb.wb[ring->rptr_offs] >> 2;
 }
 
 /**
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index bee4978..ddb8081 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -335,12 +335,8 @@ static int sdma_v3_0_init_microcode(struct amdgpu_device *adev)
  */
 static uint32_t sdma_v3_0_ring_get_rptr(struct amdgpu_ring *ring)
 {
-	u32 rptr;
-
 	/* XXX check if swapping is necessary on BE */
-	rptr = ring->adev->wb.wb[ring->rptr_offs] >> 2;
-
-	return rptr;
+	return ring->adev->wb.wb[ring->rptr_offs] >> 2;
 }
 
 /**
-- 
1.9.1

  reply	other threads:[~2016-09-14 14:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 14:39 [PATCH v2 0/5] drm: clean up several " Masahiro Yamada
2016-09-14 14:39 ` Masahiro Yamada [this message]
2016-09-15 14:45   ` [PATCH v2 1/5] drm/amdgpu: squash lines for simple " Sean Paul
2016-09-14 14:39 ` [PATCH v2 2/5] drm/radeon: " Masahiro Yamada
2016-09-15 14:45   ` Sean Paul
2016-09-14 14:39 ` [PATCH v2 3/5] drm/bridge: " Masahiro Yamada
2016-09-15 13:51   ` Sean Paul
2016-09-15 14:46     ` Sean Paul
2016-09-16  1:41       ` Masahiro Yamada
2016-09-14 14:39 ` [PATCH v2 4/5] drm/qxl: " Masahiro Yamada
2016-09-15 12:30   ` Gustavo Padovan
2016-09-15 13:47   ` Gustavo Padovan
2016-09-15 14:45     ` Sean Paul
2016-09-14 14:39 ` [PATCH v2 5/5] drm/i915: use i915_gem_open() directly instead of i915_driver_open() Masahiro Yamada
2016-09-15  9:46   ` Jani Nikula
2016-09-15  9:48     ` Masahiro Yamada

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=1473863952-7658-2-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=Emily.Deng@amd.com \
    --cc=Flora.Cui@amd.com \
    --cc=JinHuiEric.Huang@amd.com \
    --cc=Monk.Liu@amd.com \
    --cc=airlied@linux.ie \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=funfunctor@folklore1984.net \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel.daenzer@amd.com \
    --cc=ray.huang@amd.com \
    --cc=tom.stdenis@amd.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

all inboxes | Powered by JetHome®