Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1691081rwn; Fri, 9 Sep 2022 02:30:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR6PcFNb0OTneOCi2R1n/2Y99FONfK5RyXmonEYRZ1jo9E41RdEPUJXXZGrtjTDAddrNTcJI X-Received: by 2002:a2e:9c1a:0:b0:26b:2bf7:9154 with SMTP id s26-20020a2e9c1a000000b0026b2bf79154mr2318534lji.417.1662715822253; Fri, 09 Sep 2022 02:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662715822; cv=none; d=google.com; s=arc-20160816; b=0RW2CP76F4Udi04ZTRd3AEfUjM8P29eOIAn9UnuMQp4FXdsKxCrHbDOeK/chO1Rr6O 0Pci51ZAd9ZKMlH/WiKMCQo+nSIOabOcB4cKEKZDF0ylI0S6MuZLU4tfAFtOfL5Ny3Rj XenARX9H0V5d/GTAJGmG0HpYSS4K3CMhTSv7gQcON8z4FG3kCcHzWUCcR35MZ1kGRNLB npGxcxBtXdGdkA2MJMp6SrqY2n6Fiy0MS9t02weFIa7yjD+Om58AAliYqSNhBrRidPPv Qvn8Nw9Y6ubh2NJVNUEqD/pqsDd8XPhF7WtvAf4DbHagezzSE2d01aVtePWmiVMcgW/c lQtg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YrO8dXy2fVaWQ4h00uJXekWpWlIwrOmxKZnSx6oDZ7I=; b=0akJ2xm4jkU2vTgHYKMV8xb2HY6ShyKnBCAM96msLMrX0lUh8A9lYGN7tYAFpyyxJv bNIcIhhFh2njlaZTi13l6giKQRNbB2SkUXyjiR0e149XBIMGHCwZ5AnDhXJ4i7W5svaf lO4HC3HDCOe+F7n5ZzrITyBVuSLXtR/vRierfcORmMNpn5XJ4HVet56GH37TvAQd9aPm SsvfDpXcp0WxksoUHd4UvRSEGWAdoCtwY+zr0zFDR1uxEOCb1p0Q7QITyBSUPe1ZXJ3N jdxqXE237hx/GBdl2QbAFB6y0qNGeVP1V6W14FJiyU/RlV3n8p+OEsxMLgghVeWVKJPF HYEw== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n23-20020a2e9057000000b002639e63a0d0si24502ljg.124.2022.09.09.02.29.53; Fri, 09 Sep 2022 02:30:22 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231610AbiIIJ1n (ORCPT + 99 others); Fri, 9 Sep 2022 05:27:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230428AbiIIJ05 (ORCPT ); Fri, 9 Sep 2022 05:26:57 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAB93BD154 for ; Fri, 9 Sep 2022 02:25:31 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MP9XN6KgCzHnpY; Fri, 9 Sep 2022 17:23:32 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 9 Sep 2022 17:25:29 +0800 From: Miaohe Lin To: CC: , , , , Subject: [PATCH 09/16] mm/page_alloc: use local variable zone_idx directly Date: Fri, 9 Sep 2022 17:24:44 +0800 Message-ID: <20220909092451.24883-10-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220909092451.24883-1-linmiaohe@huawei.com> References: <20220909092451.24883-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Use local variable zone_idx directly since it holds the exact value of zone_idx(). No functional change intended. Signed-off-by: Miaohe Lin --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 94baf33da865..3417232afa45 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6878,7 +6878,7 @@ void __ref memmap_init_zone_device(struct zone *zone, unsigned long start = jiffies; int nid = pgdat->node_id; - if (WARN_ON_ONCE(!pgmap || zone_idx(zone) != ZONE_DEVICE)) + if (WARN_ON_ONCE(!pgmap || zone_idx != ZONE_DEVICE)) return; /* -- 2.23.0