drm/amdgpu: squash lines for simple wrapper functions
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 14 Sep 2016 14:39:08 +0000 (23:39 +0900)
committerSean Paul <seanpaul@chromium.org>
Thu, 15 Sep 2016 14:39:21 +0000 (10:39 -0400)
Remove unneeded variables and assignments.

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-2-git-send-email-yamada.masahiro@socionext.com
drivers/gpu/drm/amd/amdgpu/dce_virtual.c
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c

index 00663a7b4053d0b87b9fc88c07fd8bf1e8fff9af..619b604ab8aea4828f12bc6e76fbc87651b1d258 100644 (file)
@@ -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)
index e82229686783873173db79c1072a748f89078377..9d02ba27bb875d2c4d8c5fc8374c8aa9447f53ba 100644 (file)
@@ -190,12 +190,8 @@ out:
  */
 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;
 }
 
 /**
index bee4978bec73d4fbe09375dfc72f4d1a3eea71a6..ddb8081f78ac4a0131f8b5596c8d50e0dbe557c3 100644 (file)
@@ -335,12 +335,8 @@ out:
  */
 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;
 }
 
 /**