Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5248277ybl; Tue, 10 Dec 2019 03:02:19 -0800 (PST) X-Google-Smtp-Source: APXvYqxKuh06JuYud9L6N0DJyXW1/849l2rZ7XQAseyk06zXiK2/RQOCRB4MhTTzExEeU5zWXKdz X-Received: by 2002:aca:5188:: with SMTP id f130mr3555454oib.47.1575975739104; Tue, 10 Dec 2019 03:02:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575975739; cv=none; d=google.com; s=arc-20160816; b=cnlWtRdrp4PJFTEg/k7zddr6GwqX48up+bk1XNPK6Ibj3c1YR9pDZtFHgZsbZJcv70 KW3SlXyD66zZcW/n38fiZgKZQumop2wHKB6sMVPt//B2hjru7Rm7SbTs7Ug9WYxBn0mg Md1ev+W9+onwIn9z8xvBEjwOTPZMv42v4hlgLQyn8GHtzpCz5vUufX5SrMH9YRJ7z/Oy a/Tan6LwanVuhKuLn5Y7XK1jzrBfpsMFwGFnWszoaLdC0UVpknl2bZwUNJoOrAMWs7WS /Pfk8WgBI/D++xtyathfI80lQIk71pkZwP7dHxWj+ciu9b+VDlSQOMFcEq3C9OlkUi9k pccw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=4DeW22R5RVncKNuzYm/XQtyKsuUtuZlHmei9Romlle8=; b=A3pdHHe3B6P0gx0DODMhfcyVL++DN5vfeA9EAvWQGvRsc5Cu7THuj1h28YbKS99k7f ZogA0/MDlWNsoDtgQyW+aYcTBe0goNSGmh2MsR5guPovLAja51kESPkSbJNTfZF+VIq2 8d2j3RPNN2d7lQJx2VKRalhv9uToeVY45cyH9Wkmi8HjQjNQQ9lPNh9In2wMY3tCJb+0 1NnoBOphIWEdvqYPGt56OJ15p+Lh6E8I6ne5BAFzl0zMLp1ryxSJFjdD0z9x+T5Q81J6 jT0Dy6t9HXNUxjYWabMQM4fV3qCiMlfC1kG9EmSHyQ61zQJCemXmYKQY+rmwGfLTMsgC ep2Q== 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 b2si1630671oib.272.2019.12.10.03.01.59; Tue, 10 Dec 2019 03:02:19 -0800 (PST) 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 S1727306AbfLJK7v (ORCPT + 99 others); Tue, 10 Dec 2019 05:59:51 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:7658 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726915AbfLJK7v (ORCPT ); Tue, 10 Dec 2019 05:59:51 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 76933FF6CC4C6D65F05D; Tue, 10 Dec 2019 18:59:49 +0800 (CST) Received: from localhost.localdomain (10.90.53.225) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 10 Dec 2019 18:59:42 +0800 From: Chen Wandun To: , , , , , , , CC: Subject: [PATCH] habanalabs: remove variable 'val' set but not used Date: Tue, 10 Dec 2019 19:06:56 +0800 Message-ID: <1575976016-110900-1-git-send-email-chenwandun@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.90.53.225] 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/misc/habanalabs/goya/goya.c: In function goya_pldm_init_cpu: drivers/misc/habanalabs/goya/goya.c:2195:6: warning: variable val set but not used [-Wunused-but-set-variable] drivers/misc/habanalabs/goya/goya.c: In function goya_hw_init: drivers/misc/habanalabs/goya/goya.c:2505:6: warning: variable val set but not used [-Wunused-but-set-variable] Fixes: 9494a8dd8d22 ("habanalabs: add h/w queues module") Signed-off-by: Chen Wandun --- drivers/misc/habanalabs/goya/goya.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c index c8d16aa..7344e8a 100644 --- a/drivers/misc/habanalabs/goya/goya.c +++ b/drivers/misc/habanalabs/goya/goya.c @@ -2192,7 +2192,7 @@ static int goya_push_linux_to_device(struct hl_device *hdev) static int goya_pldm_init_cpu(struct hl_device *hdev) { - u32 val, unit_rst_val; + u32 unit_rst_val; int rc; /* Must initialize SRAM scrambler before pushing u-boot to SRAM */ @@ -2200,14 +2200,14 @@ static int goya_pldm_init_cpu(struct hl_device *hdev) /* Put ARM cores into reset */ WREG32(mmCPU_CA53_CFG_ARM_RST_CONTROL, CPU_RESET_ASSERT); - val = RREG32(mmCPU_CA53_CFG_ARM_RST_CONTROL); + RREG32(mmCPU_CA53_CFG_ARM_RST_CONTROL); /* Reset the CA53 MACRO */ unit_rst_val = RREG32(mmPSOC_GLOBAL_CONF_UNIT_RST_N); WREG32(mmPSOC_GLOBAL_CONF_UNIT_RST_N, CA53_RESET); - val = RREG32(mmPSOC_GLOBAL_CONF_UNIT_RST_N); + RREG32(mmPSOC_GLOBAL_CONF_UNIT_RST_N); WREG32(mmPSOC_GLOBAL_CONF_UNIT_RST_N, unit_rst_val); - val = RREG32(mmPSOC_GLOBAL_CONF_UNIT_RST_N); + RREG32(mmPSOC_GLOBAL_CONF_UNIT_RST_N); rc = goya_push_uboot_to_device(hdev); if (rc) @@ -2228,7 +2228,7 @@ static int goya_pldm_init_cpu(struct hl_device *hdev) /* Release ARM core 0 from reset */ WREG32(mmCPU_CA53_CFG_ARM_RST_CONTROL, CPU_RESET_CORE0_DEASSERT); - val = RREG32(mmCPU_CA53_CFG_ARM_RST_CONTROL); + RREG32(mmCPU_CA53_CFG_ARM_RST_CONTROL); return 0; } @@ -2502,13 +2502,12 @@ int goya_mmu_init(struct hl_device *hdev) static int goya_hw_init(struct hl_device *hdev) { struct asic_fixed_properties *prop = &hdev->asic_prop; - u32 val; int rc; dev_info(hdev->dev, "Starting initialization of H/W\n"); /* Perform read from the device to make sure device is up */ - val = RREG32(mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG); + RREG32(mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG); /* * Let's mark in the H/W that we have reached this point. We check @@ -2560,7 +2559,7 @@ static int goya_hw_init(struct hl_device *hdev) goto disable_queues; /* Perform read from the device to flush all MSI-X configuration */ - val = RREG32(mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG); + RREG32(mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG); return 0; -- 2.7.4