Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4536773yba; Sun, 19 May 2019 22:19:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqz62xq9A0NZNOBjEzGDXZZ6n75yI+dFiTU64z84EKei6Ya8GLuij0OlGD2beG6Fr1yuKpo1 X-Received: by 2002:a63:1d02:: with SMTP id d2mr73749670pgd.26.1558329579579; Sun, 19 May 2019 22:19:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558329579; cv=none; d=google.com; s=arc-20160816; b=Qi9qKSrJjRCZFkWk1KCAyiB+PB9+ahnbnkxgU8qOKbnJ/0cjbSTOL3InV5Q4vmQRpb ykw1DprC3qHq42eKVbH19ZfNvt3p52uR/BDlLwVrox4J5AB62iTXa14u9UuCFo6zncAw gXqzockow8giQlHezQUTvu5OzQaagUjqLMjsP/nAT2ltNlsGM/TM0WgXFHz/rc9ppN44 pBRbgpfXyHTMGT+Zw1xZenSApVOw6SZBKiqXfrmhNoWmbDOlgaGqqxA+itE6Tt4a/gGf +2BWOAZQ5MGcVHROsF/dX/GXSma3qluIB8kFZ657NlinD37d+evFSlqvbXY9xvm/9kQZ LeCw== 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=fnHRJn5bDrLA4tMrt7dFC2nmVRQ+oYli5MF3vzPxSFI=; b=DafEkvsh5m7FGTvnziZuDmR4PrDlq26QxpYjSrkSJza/50IaqfVXx7YGhds+8yVxBf kqODPTv464oW3ke3CFqYxmrUwEFtCIiZwv8wILf+2tKHbKp1gkWQi8i5AgadxIaj8bJE 9qGp8e4Nnj9QAdyc98kLRmqIfIJsgLtxUGatGkhuHcwJbOJXZCK0FuIvxNII039zHSG1 HBr7q+nBxs2ZFHSInBco8253D9jCJTdf81buzqUCPFYRQlKXEXP6WwKUyy+/SUoVyU0N PxEwsSIzj3VNsCC3wYemh6VH0/ymHgcJAF9PqNabtU5fIIe1fDwR1RNW5SD7jzflOdEa ktaQ== 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 3si17359374plv.102.2019.05.19.22.19.25; Sun, 19 May 2019 22:19:39 -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 S1730179AbfETDYv (ORCPT + 99 others); Sun, 19 May 2019 23:24:51 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8214 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728932AbfETDYv (ORCPT ); Sun, 19 May 2019 23:24:51 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3BFDE2B496AE44860F57; Mon, 20 May 2019 11:24:49 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Mon, 20 May 2019 11:24:40 +0800 From: Shaokun Zhang To: CC: Shaokun Zhang , Alexander Shishkin , Greg Kroah-Hartman Subject: [PATCH] intel_th: msu: Fix unused variable warning on arm64 platform Date: Mon, 20 May 2019 11:23:20 +0800 Message-ID: <1558322600-63308-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain 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 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 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 81bb54fa3ce8..e15ed5c308e1 100644 --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -780,7 +780,7 @@ 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; if (!nr_blocks) return 0; @@ -812,7 +812,7 @@ static int msc_buffer_win_alloc(struct msc *msc, unsigned int nr_blocks) goto err_nomem; #ifdef CONFIG_X86 - for (i = 0; i < ret; i++) + for (int i = 0; i < ret; i++) /* Set the page as uncached */ set_memory_uc((unsigned long)msc_win_block(win, i), 1); #endif @@ -860,8 +860,6 @@ 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) { - int i; - msc->nr_pages -= win->nr_blocks; list_del(&win->entry); @@ -871,7 +869,7 @@ static void msc_buffer_win_free(struct msc *msc, struct msc_window *win) } #ifdef CONFIG_X86 - for (i = 0; i < win->nr_blocks; i++) + for (int i = 0; i < win->nr_blocks; i++) /* Reset the page to write-back */ set_memory_wb((unsigned long)msc_win_block(win, i), 1); #endif -- 2.7.4