From patchwork Tue Jul 5 15:06:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhu, Rex" X-Patchwork-Id: 9215165 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 33C1E60572 for ; Tue, 5 Jul 2016 19:41:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 200D7283AC for ; Tue, 5 Jul 2016 19:41:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14934283E0; Tue, 5 Jul 2016 19:41:42 +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, HTML_MESSAGE, 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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFFBB283DF for ; Tue, 5 Jul 2016 19:41:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C80188E34; Tue, 5 Jul 2016 19:41:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 14513 seconds by postgrey-1.35 at gabe; Tue, 05 Jul 2016 19:41:36 UTC Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0042.outbound.protection.outlook.com [104.47.40.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 797726E5CE for ; Tue, 5 Jul 2016 19:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Imqtr/bbSh6CdftTiasKUBTFBuYCre5ddmyBf22SecY=; b=4Q/jHR4Ytm4vtvoTfACmWZHZzNZvRcxG21vL5GakQrQ2vBzs/CwMDpaq/OX7bHL2jtJ1g7Bwo7bNlO/xzBofP6nNSln9AtF81tud2RsQsv2Dg4ebkssvEz+p4JeZhk2UUl8CWLiRnNMdD+p6aR5lQPPK8KKYwr1OCY4FRw+EAzQ= Received: from SN1PR12MB0672.namprd12.prod.outlook.com (10.163.208.30) by SN1PR12MB0672.namprd12.prod.outlook.com (10.163.208.30) with Microsoft SMTP Server (TLS) id 15.1.534.14; Tue, 5 Jul 2016 15:07:01 +0000 Received: from SN1PR12MB0672.namprd12.prod.outlook.com ([10.163.208.30]) by SN1PR12MB0672.namprd12.prod.outlook.com ([10.163.208.30]) with mapi id 15.01.0534.015; Tue, 5 Jul 2016 15:06:59 +0000 From: "Zhu, Rex" To: Matthias Beyer , "linuxdev.baldrick@gmail.com" Subject: Re: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable Thread-Topic: [PATCH] drivers: gpu: drm: amd: powerplay: hwmgr: Remove unused variable Thread-Index: AQHR0u3rmEkqrs5acU+aQS7Ki5lqgKAJ9mL/ Date: Tue, 5 Jul 2016 15:06:59 +0000 Message-ID: References: , <20160630163849.3914-2-mail@beyermatthias.de> In-Reply-To: <20160630163849.3914-2-mail@beyermatthias.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rex.Zhu@amd.com; x-originating-ip: [132.245.39.245] x-ms-office365-filtering-correlation-id: cf6f6775-9f65-4f62-f82d-08d3a4e60394 x-microsoft-exchange-diagnostics: 1; SN1PR12MB0672; 20:V+3yIFYwoXc27V9/52a4JTORkRD7poFoLMKFqM30E0Q9e8pBn3xDz0J9jH08DubQ+uObnU5y+yO3nGtCfhk5Wf6kXJC29U6k9hmluebKzFI5r3Y6NDJ8mYPUROXiUzqJb4oxWO6t5THro2U6MLcQtZxNB8PNYFBSG6vN4gu8LvtHwJn4kA68AXN8ut7LG+Pb9LZ8TdfstEU3cpm14ESN7Ev1aUVC8yrxjkJrH7vxd3DpvKeansjpnTkMWaIcoq0T x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0672; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(767451399110)(217544274631240)(194151415913766); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:SN1PR12MB0672; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0672; x-forefront-prvs: 0994F5E0C5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(199003)(189002)(377454003)(99286002)(86362001)(19580405001)(8676002)(87936001)(81166006)(81156014)(19580395003)(8936002)(76576001)(9686002)(2950100001)(77096005)(2900100001)(2906002)(68736007)(122556002)(105586002)(54356999)(5001770100001)(97736004)(7696003)(4326007)(2501003)(50986999)(92566002)(66066001)(3846002)(33656002)(7736002)(5003600100003)(76176999)(6116002)(189998001)(102836003)(101416001)(7846002)(19627405001)(106116001)(106356001)(16236675004)(5002640100001)(586003)(10400500002)(19625215002)(74316002)(3280700002)(3660700001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0672; H:SN1PR12MB0672.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2016 15:06:59.6557 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0672 Cc: "nils.wallmenius@gmail.com" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Huang, JinHuiEric" , "dcb314@hotmail.com" , "Deucher, Alexander" , "Koenig, Christian" 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Yes, stretch_amount2 was not used on Polaris. Patch was Reviewed-by: Rex Zhu Thanks. Best Regards Rex 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,