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: 9332737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46A2B60231 for ; Thu, 15 Sep 2016 00:51:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 365D328F7E for ; Thu, 15 Sep 2016 00:51:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B14428F8B; Thu, 15 Sep 2016 00:51:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 91E5C28F7E for ; Thu, 15 Sep 2016 00:51:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 948EB6E7D9; Thu, 15 Sep 2016 00:51:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D12A6E763 for ; Wed, 14 Sep 2016 14:40:25 +0000 (UTC) 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 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> X-Mailman-Approved-At: Thu, 15 Sep 2016 00:49:50 +0000 Cc: Tom St Denis , Emily Deng , =?UTF-8?q?Michel=20D=C3=A4nzer?= , linux-kernel@vger.kernel.org, Masahiro Yamada , Eric Huang , Huang Rui , Alex Deucher , Flora Cui , Edward O'Callaghan , Christian K?nig , Monk Liu X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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; } /**