From patchwork Wed Sep 14 14:39:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 76219 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1910547qgf; Wed, 14 Sep 2016 07:41:09 -0700 (PDT) X-Received: by 10.66.7.8 with SMTP id f8mr5054729paa.91.1473864069145; Wed, 14 Sep 2016 07:41:09 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 79si33838412pfl.71.2016.09.14.07.41.08; Wed, 14 Sep 2016 07:41:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764287AbcINOk4 (ORCPT + 27 others); Wed, 14 Sep 2016 10:40:56 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:50040 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764056AbcINOkw (ORCPT ); Wed, 14 Sep 2016 10:40:52 -0400 Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-08.nifty.com with ESMTP id u8EEdDmN016736; Wed, 14 Sep 2016 23:39:28 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u8EEdDmN016736 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473863971; bh=pCyDS1sXgo+cZr8KabBh0b2JZKXRHDHtkYRG/9XXxzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dFgb2d7bkqY3RKbvyh7QbwaqoG46b1kc4MNGymWLYzH7xPlHy6RPmjqfSExfpvKhg zwtRyclevyeS3QTBo66BN6SdvHxlofn20p+sicpkm8Hl7DrHVw9z337f8badju+N/p vIala+h4wSHEtrrXU5L4DEdbATontwk9fhL1TT1nm83itzckfNkublrgO++LbXy9rr MhocCbp4b8mE0YNssJ0kehDukjK6Z59/TQAf+Xz6yjz02kI4vVgH/KJyf61lB5fCZK KeJ68oTOPNkRSWXb+6d1QCgGl6yq97YLsUz+ZKqHMR1Tm5raOLs5mqoq4ex9Vq96eZ JRd09FosA0+cg== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: David Airlie , dri-devel@lists.freedesktop.org Cc: Christian K?nig , Jani Nikula , Alexander Deucher , Masahiro Yamada , "Edward O'Callaghan" , Emily Deng , Tom St Denis , Eric Huang , linux-kernel@vger.kernel.org, Huang Rui , Chunming Zhou , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Alex Deucher , Monk Liu , Flora Cui Subject: [PATCH v2 1/5] drm/amdgpu: squash lines for simple wrapper functions Date: Wed, 14 Sep 2016 23:39:08 +0900 Message-Id: <1473863952-7658-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473863952-7658-1-git-send-email-yamada.masahiro@socionext.com> References: <1473863952-7658-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada --- 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(-) -- 1.9.1 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; } /**