Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4673447yba; Mon, 20 May 2019 01:31:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMU/YijrvdO4sR/MXwkORwokRojYkCfcE3UO3BPpx4XmMrXsH2YwtLrQQxxkqxhnDsf363 X-Received: by 2002:a63:1212:: with SMTP id h18mr24310979pgl.266.1558341078013; Mon, 20 May 2019 01:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558341078; cv=none; d=google.com; s=arc-20160816; b=OuEtjjTCTboRlDxyGhmboglaFOc/g0YPv3llTCWt/cGSGNpJ4kXJ525v3iTISaHvEk hxCVtGKxksilFXG+KJRzZfZDVs3zJbvuyN4RYxDJ2EbHHbQDMyZ5ZovC9nC3aSwyJqUd s1ZNllto+tjgBXHLZykIx571Gk4QYWeuG3u7B2I1iZPTVXiP5s2tYYeZem9slxX+yaDO hD9rGhapgQwKt3Zj22CIOR+yStAJiTDJjYBAzMTaQv+eweHxn5N766vMvFWUy0bq0Cnq Mt5Mhz8T5SBLmsDF+AdtlO/yNGafPvIXsS6h6ZaloIUee9OYZBx022iazYBrBouNADp9 06tg== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=gFJHrslupQOGDpN8WqK86CszzDYqPkV337cPzGJGk6w=; b=m7OwnK8D5zYxJ2RFj7fLrpmEGfh11IRKRePKz/IZfjDhxq8m4ZEeUpbs3axE3YxU98 k4fz+LioKe7ydviCXpALqLcQtcbjXJPI1ChYw5gbGr4fILBlUnkA6ugQ/PJvKmGX2RSW AlyHwW/EVigmpR+BWhLiKxaNGJjSvBE4btqCxdSMDpxdejd9pYswvG08bvCKaNgxE119 HvQjMJFI3QZyeAm0/4szIaJYdmx4NbjTrHPGE3MK+phon3449CeYv6oVMwLlGv/JuJe2 skY/dsDpgTNQt5/osgCb45LjHZIFJcJEYdqm4PpFAYXtvaLV96Aa4xNCe7JNegS1YGBy byww== 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 y10si2045572pfp.167.2019.05.20.01.31.02; Mon, 20 May 2019 01:31:17 -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 S1729882AbfETFtn (ORCPT + 99 others); Mon, 20 May 2019 01:49:43 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:41128 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725829AbfETFtn (ORCPT ); Mon, 20 May 2019 01:49:43 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A5DB5671AB52C5D36C19; Mon, 20 May 2019 13:49:41 +0800 (CST) Received: from [127.0.0.1] (10.74.221.148) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Mon, 20 May 2019 13:49:38 +0800 Subject: Re: [PATCH] intel_th: msu: Fix unused variable warning on arm64 platform To: References: <1558322600-63308-1-git-send-email-zhangshaokun@hisilicon.com> CC: Alexander Shishkin , "Greg Kroah-Hartman" From: Zhangshaokun Message-ID: <500b89b0-3d85-b1ab-4c13-abca31d184bd@hisilicon.com> Date: Mon, 20 May 2019 13:49:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1558322600-63308-1-git-send-email-zhangshaokun@hisilicon.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.74.221.148] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org please ignore this patch, I will update it and resend it. On 2019/5/20 11:23, Shaokun Zhang wrote: > 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 >