Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp957212imw; Tue, 5 Jul 2022 00:57:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1toKY1XOyL6g4j2Lqi4HsNzY7ENvATeUHsXspH4ZSfbHaPQ0acD64GW45ECv295PqnxwW35 X-Received: by 2002:a50:e613:0:b0:439:fd34:32db with SMTP id y19-20020a50e613000000b00439fd3432dbmr20633886edm.291.1657007838475; Tue, 05 Jul 2022 00:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657007838; cv=none; d=google.com; s=arc-20160816; b=HFOt4m21iA4bhDfmgAWLAnJrkTzHtzxbXRokcX6yPXA3ovLSCAq7UKXc0HrZpqg/i+ 3XM7IxQ1PqgOf+lMWyA/LpRV3mTdwKdvQHEkGhjWRTX/cMEAM8rVhdmQOcxjfImyIel0 Wyalola9Z8Ovd/kYnHcJtySFuFB8LSRXzccEYyKW6BiW1hRSS8C5gcoP8qQEvQVFf8jj C2lz/BSPuSAyxnhA6uLBBTHrLe5FSQ2jay6dak1GijwruiiXxDsz6tGIRBwgUkEy5Tss /5j1fADnM/3OoIbvhIpBDh523P8qQm9fJDb0OWcz7LvSQdDZlb4GxK6KHnbPxCcAmxtq vm9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Bf4qcP8JoGa+TJgC05numysj/p9PvPeCQpA/qYxYu1Q=; b=FJ6MrZUOOjKC9xNqhYZ/HnG3icS1PrmolmrqVJZIcWImyhb4J2u+ur7AaQoyZE+Qxl 04bcNQ+iyMEipXmznQPV+KwhJOPQLSOvkftj5o5us9vhljqhhJi+o5z3GXl6BxhBdrus ES4eiirRqRA9MdC+Q7bjigD7AcypnTL3lZikcm9X+VSWqVHSPQutyj+QEPvEx/0m5nER HZfEL409BwK227J7M1WAEE1Or+mK12Bg7qjp67YaX1NSNEVi6hB9859VIOAnlFHTYPH+ W7EcEUFejTMiBlphHdnbUHg+69HMYMY4gjkcyrFK92fo/6+UZPC0y9+cdF5A/DXHr4LG Uz0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp3-20020a1709073e0300b00708906f7c96si5609307ejc.153.2022.07.05.00.56.52; Tue, 05 Jul 2022 00:57:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231240AbiGEHeK (ORCPT + 99 others); Tue, 5 Jul 2022 03:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230082AbiGEHeJ (ORCPT ); Tue, 5 Jul 2022 03:34:09 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C6F21B0 for ; Tue, 5 Jul 2022 00:34:06 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VIR2GSE_1657006431; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VIR2GSE_1657006431) by smtp.aliyun-inc.com; Tue, 05 Jul 2022 15:34:02 +0800 From: Jiapeng Chong To: tglx@linutronix.de Cc: mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] x86/CPU: drop set but unused variable Date: Tue, 5 Jul 2022 15:33:49 +0800 Message-Id: <20220705073349.1512-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following warning showed up when compiling with W=1. arch/x86/kernel/cpu/cacheinfo.c:730:15: warning: variable 'trace' set but not used [-Wunused-but-set-variable]. Signed-off-by: Jiapeng Chong --- arch/x86/kernel/cpu/cacheinfo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c index 66556833d7af..7ef070fbc14c 100644 --- a/arch/x86/kernel/cpu/cacheinfo.c +++ b/arch/x86/kernel/cpu/cacheinfo.c @@ -727,7 +727,7 @@ void init_hygon_cacheinfo(struct cpuinfo_x86 *c) void init_intel_cacheinfo(struct cpuinfo_x86 *c) { /* Cache sizes */ - unsigned int trace = 0, l1i = 0, l1d = 0, l2 = 0, l3 = 0; + unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; @@ -828,9 +828,11 @@ void init_intel_cacheinfo(struct cpuinfo_x86 *c) case LVL_3: l3 += cache_table[k].size; break; - case LVL_TRACE: - trace += cache_table[k].size; - break; + /* + * case LVL_TRACE: + * trace += cache_table[k].size; + * break; + */ } break; -- 2.20.1.7.g153144c