From patchwork Mon Nov 13 03:43:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Liu, Monk" X-Patchwork-Id: 10055157 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 7F28960365 for ; Mon, 13 Nov 2017 06:16:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6700629203 for ; Mon, 13 Nov 2017 06:16:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49B9729214; Mon, 13 Nov 2017 06:16:27 +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=unavailable 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 865CF29203 for ; Mon, 13 Nov 2017 06:16:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DD8A6E256; Mon, 13 Nov 2017 06:16:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 3573 seconds by postgrey-1.35 at gabe; Mon, 13 Nov 2017 06:16:22 UTC Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0067.outbound.protection.outlook.com [104.47.42.67]) by gabe.freedesktop.org (Postfix) with ESMTPS id 157B56E256 for ; Mon, 13 Nov 2017 06:16:21 +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=1jWlBq2YDbfAkDCiKMgG8WV5T1lmvcd3xr27q9lD3/0=; b=W8OZfROoQ3z+HgJJzbD3NbFr2fRpWjqW7sUUVFkOrzBd+k41d4lpw+MiRj95ncq9DSM0blTTimgQeGg+Bt4us3JsgA30Urmf6k3l9KnzAFfZYeOd7olW3wWyKtGrasDsrYohY+nqXLTqv9huTa8euxU6SOhbvkmJoAtDHlau89w= Received: from SN1PR12MB0462.namprd12.prod.outlook.com (10.162.105.143) by BN6PR12MB1651.namprd12.prod.outlook.com (10.172.19.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Mon, 13 Nov 2017 03:43:19 +0000 Received: from SN1PR12MB0462.namprd12.prod.outlook.com ([10.162.105.143]) by SN1PR12MB0462.namprd12.prod.outlook.com ([10.162.105.143]) with mapi id 15.20.0218.011; Mon, 13 Nov 2017 03:43:18 +0000 From: "Liu, Monk" To: "Chen, Horace" , Colin King , "Deucher, Alexander" , "Koenig, Christian" , David Airlie , "Yu, Xiangliang" , "amd-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" Subject: RE: [PATCH] drm/amdgpu/virt: remove redundant variable pf2vf_ver Thread-Topic: [PATCH] drm/amdgpu/virt: remove redundant variable pf2vf_ver Thread-Index: AQHTWuNhhwwnWvhtmEOZIRvcPk3C/KMRrTyw Importance: high X-Priority: 1 Date: Mon, 13 Nov 2017 03:43:17 +0000 Message-ID: References: <20171111115110.3026-1-colin.king@canonical.com> In-Reply-To: <20171111115110.3026-1-colin.king@canonical.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Monk.Liu@amd.com; x-originating-ip: [116.228.147.243] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BN6PR12MB1651; 20:nQQhAbTftst1OqVpYkM4BR4q6WuHdDrSj2BEcCBrMj9k7ZJe0VSEVB14JbcMw6HMZh75DUqR9BkLCP0aY6mQ75TjsMQDsMqwFS6hi6bBsl/G/YPx4soZ6YLPUgRbEKJfXWuUtpX5vIQmc4OM6OWOPV5nTdgB2XVZuXKRuzbE23qn4UiyhxyvYopwPH7OX4mbZT7J7aWnCF+ObVzZk1dj+4Yr+Ul8kwWqQwHQdmNYxjdL2/vsbj1CEA0rInUMeLxZ x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(39860400002)(189002)(13464003)(199003)(53936002)(316002)(54906003)(110136005)(101416001)(81686999)(54356999)(50986999)(76176999)(6246003)(9686003)(189998001)(4326008)(55016002)(2501003)(99286004)(102836003)(3846002)(6116002)(97736004)(3660700001)(2906002)(3280700002)(53546010)(2201001)(68736007)(106356001)(6506006)(6436002)(77096006)(86362001)(2900100001)(2950100002)(7696004)(5660300001)(229853002)(72206003)(14454004)(33656002)(478600001)(8936002)(66066001)(7736002)(305945005)(25786009)(81166006)(74316002)(81156014)(105586002)(8676002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1651; H:SN1PR12MB0462.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: 0903e662-694b-4496-75dc-08d52a48ad92 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:BN6PR12MB1651; x-ms-traffictypediagnostic: BN6PR12MB1651: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(767451399110)(217544274631240)(198206253151910); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3231022)(6055026)(6041248)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1651; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1651; x-forefront-prvs: 0490BBA1F0 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-Network-Message-Id: 0903e662-694b-4496-75dc-08d52a48ad92 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Nov 2017 03:43:17.9768 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1651 Cc: "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" 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 + Horace -----Original Message----- From: Colin King [mailto:colin.king@canonical.com] Sent: 2017年11月11日 19:51 To: Deucher, Alexander ; Koenig, Christian ; David Airlie ; Liu, Monk ; Yu, Xiangliang ; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org Subject: [PATCH] drm/amdgpu/virt: remove redundant variable pf2vf_ver From: Colin Ian King Variable pf2vf_ver is assigned but never read, it is redundant and hence can be removed. Cleans up clang warning: drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:310:3: warning: Value stored to 'pf2vf_ver' is never read Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 -- 1 file changed, 2 deletions(-) adev->virt.fw_reserve.p_pf2vf = (struct amdgim_pf2vf_info_header *)( adev->fw_vram_usage.va + AMDGIM_DATAEXCHANGE_OFFSET); - pf2vf_ver = adev->virt.fw_reserve.p_pf2vf->version; AMDGPU_FW_VRAM_PF2VF_READ(adev, header.size, &pf2vf_size); AMDGPU_FW_VRAM_PF2VF_READ(adev, checksum, &checksum); -- 2.14.1 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c index 6738df836a70..b1cc179512fa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c @@ -296,7 +296,6 @@ int amdgpu_virt_fw_reserve_get_checksum(void *obj, void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev) { - uint32_t pf2vf_ver = 0; uint32_t pf2vf_size = 0; uint32_t checksum = 0; uint32_t checkval; @@ -309,7 +308,6 @@ void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)