Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4616535yba; Mon, 20 May 2019 00:11:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1jLCIY1m+UyEvc4a9SfGxZFVxNNnNKiQFaIEwU7MPjCtB7YCh3puVgQQSCcTXr3z+bP5V X-Received: by 2002:a63:cc4e:: with SMTP id q14mr71680490pgi.84.1558336309248; Mon, 20 May 2019 00:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558336309; cv=none; d=google.com; s=arc-20160816; b=DaVS6bQCpQ2AJdwmo+u0vGMCkmN7yPIoDiqbQegR8j66VKP60pNWmJSGIKEWxEvQD8 dtPPHQsmsYP0qy3Zz594sXf3leEYQx3FeugHr+quDBfYyLrDa8HFb0Q8TJRjv2cgWIcN NE0yYtBdf6S1RRttk3E/LwXFFreFEUu0zEZ1KOahfLLY/m4nxAlB8gHbHap12Nzqguju gc52VocV9J2pBCTN4wyuMJbk3vRz1ptYtCkzrLSRXzUm5Ofqq4iwcrgtSqhnz56Ic1Pa lbXn2Q16/dgEoxMiSTflJRldVYeiahlL1NvlSclJm2slEXS2EmAp8VgoMBfWFYGLX55S DCHg== 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=eHtyobkvDbwTh1HfeLW8UkvDO0MYMgZKmF7n53OywzQ=; b=gicOoMGIRsZkAY0vi2rgMCzMc/G3Wtvmlx+4roo8GnaD5TiNBtPJeD6mmRe2UcnmlD tdVFe2NhoEvCW9sAW96qJKxwwvLYFfTZqn13JIJFCFh+nn5uDw8AmYB0VPQ8Pd2Lni1a TEulgSf13Qt+UPejmfsg8/d9Ivr8lDIgjERjWG3Nowplq8kCbXf7HmpWtZp6rtA3KYZN 7Cz+njxGD1BbnBA961O9K0eEu+t0W7nmfj4bK58v0JQOMfBDY/OWcnvPo0O1tDdzyhGf 6zcConpaUfiawxjK3Yi5BMDAeB19ri6bgUj1EexOa/Fm4m9g6bRhSTRr8HSGpYCVNSAg ToTQ== 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 97si17324827plc.181.2019.05.20.00.11.34; Mon, 20 May 2019 00:11:49 -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 S1730761AbfETG2K (ORCPT + 99 others); Mon, 20 May 2019 02:28:10 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8215 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729725AbfETG2K (ORCPT ); Mon, 20 May 2019 02:28:10 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id CE9BFC881F498E87A3B8; Mon, 20 May 2019 14:28:07 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Mon, 20 May 2019 14:27:57 +0800 From: Shaokun Zhang To: CC: Shaokun Zhang , Alexander Shishkin , Greg Kroah-Hartman Subject: [RESEND PATCH] intel_th: msu: Fix unused variable warning on arm64 platform Date: Mon, 20 May 2019 14:26:37 +0800 Message-ID: <1558333597-63774-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drivers/hwtracing/intel_th/msu.c: In function ‘msc_buffer_win_alloc’: drivers/hwtracing/intel_th/msu.c:783:21: warning: unused variable ‘i’ [-Wunused-variable] int ret = -ENOMEM, i; ^ drivers/hwtracing/intel_th/msu.c: In function ‘msc_buffer_win_free’: drivers/hwtracing/intel_th/msu.c:863:6: warning: unused variable ‘i’ [-Wunused-variable] int i; ^ Fix this compiler warning on arm64 platform. Cc: Alexander Shishkin Cc: Greg Kroah-Hartman Signed-off-by: Shaokun Zhang --- drivers/hwtracing/intel_th/msu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 81bb54fa3ce8..833a5a8f13ad 100644 --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -780,7 +780,10 @@ static int __msc_buffer_win_alloc(struct msc_window *win, static int msc_buffer_win_alloc(struct msc *msc, unsigned int nr_blocks) { struct msc_window *win; - int ret = -ENOMEM, i; + int ret = -ENOMEM; +#ifdef CONFIG_X86 + int i; +#endif if (!nr_blocks) return 0; @@ -860,7 +863,9 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win) */ static void msc_buffer_win_free(struct msc *msc, struct msc_window *win) { +#ifdef CONFIG_X86 int i; +#endif msc->nr_pages -= win->nr_blocks; -- 2.7.4