From nobody Sat May 10 05:38:17 2025 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=linux.alibaba.com ARC-Seal: i=1; a=rsa-sha256; t=1604818045; cv=none; d=zohomail.com; s=zohoarc; b=Ctk1ZWzs9qPzDnW6+OZEodGI6jdMQMcahJuHuMHSuRRxiudptI+apE6rmpJh7/ma4Uu5dtdSHP5mF7B9ec4cziCg12+xEUcHqLNhOmZMry0rVkWK/vaA9d1ZjxwJDjfyaNQsoAnTRmKInoMeTYe3Zv47VCOzXJbkvbLFHcqDBJU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604818045; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Id:MIME-Version:Message-ID:Subject:To; bh=t6DKWm0huPOzY619fncdSWhXTIdwvafm2NlKoamTdJ8=; b=FfoqUl3VyyLuANRr5JehLTJfSGAWsT4pB+dtMXoEsRozJ5EeDA7OFi/Meo0sZwCZxCJ2loZkFbXJ1Z8rIO6kfxdhSo40U9CsgY4rmENkdNq1l/HkbPo2OrVUdeS/qNF4V8cT1jbqMRzQ1bIKhQMebbPgX3OvA4swqeuYyylI0Ok= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1604818045487539.0566685171103; Sat, 7 Nov 2020 22:47:25 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727881AbgKHGrV (ORCPT ); Sun, 8 Nov 2020 01:47:21 -0500 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:48547 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727667AbgKHGrV (ORCPT ); Sun, 8 Nov 2020 01:47:21 -0500 Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UEZYia4_1604818026) by smtp.aliyun-inc.com(127.0.0.1); Sun, 08 Nov 2020 14:47:07 +0800 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R761e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UEZYia4_1604818026; From: Alex Shi Cc: Dave Hansen , Andy Lutomirski , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: [PATCH] x86/tlb: remove unused varible 'cpu' Date: Sun, 8 Nov 2020 14:47:04 +0800 Message-Id: <1604818024-3873-1-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's not used, we could remove it to avoid a W1 warning: arch/x86/mm/tlb.c:318:6: warning: variable =E2=80=98cpu=E2=80=99 set but no= t used [-Wunused-but-set-variable] Signed-off-by: Alex Shi Cc: Dave Hansen =20 Cc: Andy Lutomirski =20 Cc: x86@kernel.org=20 Cc: "H. Peter Anvin" =20 Cc: linux-kernel@vger.kernel.org=20 --- arch/x86/mm/tlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 88e9ad5142e4..be2e9080ca79 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -315,7 +315,7 @@ void leave_mm(int cpu) =20 int enable_l1d_flush_for_task(struct task_struct *tsk) { - int cpu, ret =3D 0, i; + int ret =3D 0, i; =20 /* * Do not enable L1D_FLUSH_OUT if @@ -328,7 +328,7 @@ int enable_l1d_flush_for_task(struct task_struct *tsk) !static_cpu_has(X86_FEATURE_FLUSH_L1D)) return -EINVAL; =20 - cpu =3D get_cpu(); + get_cpu(); =20 for_each_cpu(i, &tsk->cpus_mask) { if (cpu_data(i).smt_active =3D=3D true) { --=20 1.8.3.1