Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3629214rdg; Wed, 18 Oct 2023 00:42:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMglJQiVK+xo9bBMiusn9WgikcErT4CM9iQtLibI2YgdcjMXI2kDGchFaCCFfxUMMzC9wv X-Received: by 2002:a17:90b:190b:b0:276:7907:ecf with SMTP id mp11-20020a17090b190b00b0027679070ecfmr4150053pjb.36.1697614941064; Wed, 18 Oct 2023 00:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697614941; cv=none; d=google.com; s=arc-20160816; b=ybNb8il3revw6rGQGrP3ayXlP02wXCm+SzD/fMN/I/L342bptHOIT0mtThkW4cz/0r eo6JaZDrzn5M8Q2GU9hZkgcmUjIt5KIloKRYFf2X8bnBPi5W7371VbWijviJzZp/195G 761arm0h+LOxWsgDLAqKZsVqiuGjUrQFVBg5/kxFPsPjm/ArzELFnXxxERUjNFl8tHg7 vKYJj/Z5u3Au+NWXl0ko7Hu/J+z7UixDxNOFfKbhnEW/fuPorMMa+uxs797Wd+BqVQmF es/QSO6vr/b11DLrKxTQ4qEWtngeM59ecfUCq3c/6GmDx4xJMk0alpY5WsN0i/lo4dLw KzWw== 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=4o5rY58v6jm34/f1URAbySbD3/Gadp5IL9ibYXO/D1o=; fh=0VuHv1ZlObXZ/AHP9yc1x7vAFlbENsSqo0R8x8ZF8Yg=; b=kO7QITDd8fC79d4P4i4FSLa1rLVeZeK8gBjdCkcOWn7Av3K+k+3Wp2I4GJL9t97TTW 9h6dH5QWF9UPMT4MgBtylyne2TqF9C8Rf+RZCs6bePNHF6gAavWYbXbDW6EYJ2dTLV1G RvDwEcGh5zcNUQ87S4IGFpelKn4+P5sJ+Fs6Gfs1/tCLW5hRSI2ETot2L634CDqPMvBU f1XRcNVdKptdsJJtZqQBMigmQoxIJ3k67Mm+p0wtXbQJhggJ3sQxgip/Li47a49Er8NW bHRmQXuRe5BuwuRqOtBJdfCjxapt6hci/8ccT0TpjR5DLP0YPSzmyXRUSl5wbqxZHXev rX6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id cm20-20020a056a020a1400b00578f23273a3si1705113pgb.738.2023.10.18.00.42.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 00:42:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2B5F68076D2B; Wed, 18 Oct 2023 00:42:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344500AbjJRHmK (ORCPT + 99 others); Wed, 18 Oct 2023 03:42:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjJRHmJ (ORCPT ); Wed, 18 Oct 2023 03:42:09 -0400 Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26F6BB6 for ; Wed, 18 Oct 2023 00:42:06 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;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=10;SR=0;TI=SMTPD_---0VuPvrwo_1697614917; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VuPvrwo_1697614917) by smtp.aliyun-inc.com; Wed, 18 Oct 2023 15:42:03 +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, jgross@suse.com, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] x86/mtrr: Remove redundant code Date: Wed, 18 Oct 2023 15:41:55 +0800 Message-Id: <20231018074155.68775-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=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 18 Oct 2023 00:42:18 -0700 (PDT) arch/x86/kernel/cpu/mtrr/cleanup.c:943:4: warning: Value stored to 'highest_pfn' is never read. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6912 Signed-off-by: Jiapeng Chong --- arch/x86/kernel/cpu/mtrr/cleanup.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c b/arch/x86/kernel/cpu/mtrr/cleanup.c index 18cf79d6e2c5..c4ec295cebbc 100644 --- a/arch/x86/kernel/cpu/mtrr/cleanup.c +++ b/arch/x86/kernel/cpu/mtrr/cleanup.c @@ -939,8 +939,6 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn) if (mtrr_tom2) { range[nr_range].start = (1ULL<<(32 - PAGE_SHIFT)); range[nr_range].end = mtrr_tom2 >> PAGE_SHIFT; - if (highest_pfn < range[nr_range].end) - highest_pfn = range[nr_range].end; nr_range++; } nr_range = x86_get_mtrr_mem_range(range, nr_range, 0, 0); -- 2.20.1.7.g153144c