Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1348686ybi; Fri, 21 Jun 2019 19:57:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNpR3oh6I956x2OB6J5qS2QjG5QVY8UDW2bfgm8uTVTFyV8nlRESNB/3S+yoi9ZXYZTwj+ X-Received: by 2002:a17:90a:2008:: with SMTP id n8mr10449639pjc.4.1561172229591; Fri, 21 Jun 2019 19:57:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561172229; cv=none; d=google.com; s=arc-20160816; b=GweJLKrmt/dg2IM3r9rHdm7Yb6iM/2uLL7CLCxqba/b3/L7Rkotpq1iSuXwhoZnABC 8xiSCpUhyirU3kY9T8huSIuiQWSbTdtPcpJtbSLzs7UzY87u/7vGZRGM12p8Qczjv/H8 AC1kIPbLmmJ7+scfwlc+ROJGkF1AgZn65GP5z5D6boEHBSjsyxxz6JDhjONJBWxagE5T Dtxod+3aEqcPp5ZSncbiU1O/xh3/NfA3O8AP3+f99ZU6mTo7OFez3Bsxki73kyOSwSla Tm0SLvp83u4cB6aj6CU69MfPbhdi3IStSBtjmamE/RIBmbIifT7LUs3y5vY7HYn+OKdU OCxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=SZ7P9FYxFLrskWEijaLO4uR0Dvm7zJ7tMCInNEvnlH0=; b=UqDAtUmHxE4bz4vJeSbKxdpDP4VuLcpCeEe4J+mqwir4bo1HAY5nKTvFt9Fx5S73rj AJmfedLvn4G4Caow25sC/I9wlLBSQsemxizDA9eGS5TiucpUyRQ984X8gpHORlvczKcb Pq7QpHlFj/HxSwMAR70qSgRYFkINLkfhF3lvBZyJ8gS0oByOrxabPNYYgNzna6WS5uKQ FVpk0H13hPNiNXHdAyPqrG8+RCYOcjgG5j/k50own30g/OGuMCrimY+QIwUbmbZ+VT+5 qZSluk5B9Z8s2ZpFmJxuB/tcS1Y++xDIggZccOiswuVgQGkq6OMqV0GvtlnjNwRxqNrZ UQvw== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8si4045874pll.64.2019.06.21.19.56.41; Fri, 21 Jun 2019 19:57: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; 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 S1726098AbfFVC42 (ORCPT + 99 others); Fri, 21 Jun 2019 22:56:28 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:18662 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726049AbfFVC42 (ORCPT ); Fri, 21 Jun 2019 22:56:28 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0B1AB4389754AB1163D6; Sat, 22 Jun 2019 10:56:21 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Sat, 22 Jun 2019 10:56:12 +0800 From: Mao Wenan To: , , , , CC: , , , Mao Wenan Subject: [PATCH -next] drm/amdgpu: remove set but not used variables 'ret' Date: Sat, 22 Jun 2019 11:03:14 +0800 Message-ID: <20190622030314.169640-1-maowenan@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c: In function ‘amdgpu_pmu_init’: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:249:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret = 0; ^ It is never used since introduction in 9c7c85f7ea1f ("drm/amdgpu: add pmu counters") Signed-off-by: Mao Wenan --- drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c index 0e6dba9..0bf4dd9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c @@ -246,12 +246,10 @@ static int init_pmu_by_type(struct amdgpu_device *adev, /* init amdgpu_pmu */ int amdgpu_pmu_init(struct amdgpu_device *adev) { - int ret = 0; - switch (adev->asic_type) { case CHIP_VEGA20: /* init df */ - ret = init_pmu_by_type(adev, df_v3_6_attr_groups, + init_pmu_by_type(adev, df_v3_6_attr_groups, "DF", "amdgpu_df", PERF_TYPE_AMDGPU_DF, DF_V3_6_MAX_COUNTERS); -- 2.7.4