From patchwork Thu Jun 30 16:38:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Beyer X-Patchwork-Id: 9209133 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 A701B607D6 for ; Fri, 1 Jul 2016 01:24:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98FC728505 for ; Fri, 1 Jul 2016 01:24:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CC87285BA; Fri, 1 Jul 2016 01:24:31 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 235C828505 for ; Fri, 1 Jul 2016 01:24:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6330F6E947; Fri, 1 Jul 2016 01:24:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from libra.uberspace.de (libra.uberspace.de [95.143.172.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0E2186E950 for ; Thu, 30 Jun 2016 16:45:45 +0000 (UTC) Received: (qmail 12246 invoked from network); 30 Jun 2016 16:39:02 -0000 Received: from localhost (HELO localhost) (127.0.0.1) by libra.uberspace.de with SMTP; 30 Jun 2016 16:39:02 -0000 From: Matthias Beyer To: linuxdev.baldrick@gmail.com Subject: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable Date: Thu, 30 Jun 2016 18:38:49 +0200 Message-Id: <20160630163849.3914-2-mail@beyermatthias.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160630163849.3914-1-mail@beyermatthias.de> References: <20160630163849.3914-1-mail@beyermatthias.de> In-Reply-To: References: X-Mailman-Approved-At: Fri, 01 Jul 2016 01:23:42 +0000 Cc: nils.wallmenius@gmail.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Matthias Beyer , JinHuiEric.Huang@amd.com, dcb314@hotmail.com, alexander.deucher@amd.com, Rex.Zhu@amd.com, christian.koenig@amd.com 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 Signed-off-by: Matthias Beyer --- drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c index 64ee78f..1dcd52d 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c @@ -1761,7 +1761,7 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr) { uint32_t ro, efuse, volt_without_cks, volt_with_cks, value, max, min; struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->backend); - uint8_t i, stretch_amount, stretch_amount2, volt_offset = 0; + uint8_t i, stretch_amount, volt_offset = 0; struct phm_ppt_v1_information *table_info = (struct phm_ppt_v1_information *)(hwmgr->pptable); struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table = @@ -1806,11 +1806,8 @@ static int polaris10_populate_clock_stretcher_data_table(struct pp_hwmgr *hwmgr) } /* Populate CKS Lookup Table */ - if (stretch_amount == 1 || stretch_amount == 2 || stretch_amount == 5) - stretch_amount2 = 0; - else if (stretch_amount == 3 || stretch_amount == 4) - stretch_amount2 = 1; - else { + if (stretch_amount != 1 && stretch_amount != 2 && stretch_amount != 3 && + stretch_amount != 4 && stretch_amount != 5) { phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_ClockStretcher); PP_ASSERT_WITH_CODE(false,