Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp221511rwd; Mon, 15 May 2023 23:27:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sLrWZ9rv0hTyu1LQXIXyVb267nIK/OO8GBVX2lxapO7j1or18at6fUE8Oi6FtKIFSTDrA X-Received: by 2002:a05:6a20:3c87:b0:100:5ee1:2a05 with SMTP id b7-20020a056a203c8700b001005ee12a05mr39587586pzj.27.1684218467372; Mon, 15 May 2023 23:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684218467; cv=none; d=google.com; s=arc-20160816; b=P5SLijJFNR/5pflAwpzP2J05EI9oIHCSDd8ofmpNyFkOey2AbqxakZ+Kh0QRXVTVoR 4gJFm92fdM8lxvFXhWOYQ32bO5ed07BcA9yLvaEytKocq0pgl6UqxI181K9zc47LTsfB Xxpc6lo8pjswD99DI6xEqDchaupSP1x1x0/UEACGm4WCnlxyfrcnrsGdRX+v6FGgSpar O9b3N8eyC6FUmIbZyabcVMuQOzRv3Q/iir68mB4kTk0PRlmujlsiJbOCKdz/jf0QOvj3 nLGxHQ5l//FuZjJqpVy5YKuPPvWYiSWQ/8QeiSPzUJ9Sj9i9CIjpellKbvriqqAJ9Viu mmPw== 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=583j3fsviF54SiM/q72kdov29+3Gn5DDJT2PVj0/et8=; b=fXTGC/K9pf7hQGIyfjUnvfYU4HByC5u0TBY9TLbOOosXSrY0xv44oQ1D7yf6H9F+Of 2ek/uCWYlf3jMmkSgD/Pwnde8Pkac9ptO0jJKykSdqxInH5byaFVSUhTayjZSZgGg8i7 4LKjEqVeFRA9stK65c0aflclh/EVHl5W0/S9SVet5kj6/rYA/cWvu9WdxhVxVF7M2yFg h3G2eDnUn7D3gy2tUi7JGCmVs1gPZuNQYaVuL4+s48+5bO6kxBm57MdmUyY5V/E3vA8E LD3rbpbxgubvg6xoKRxhK6AVYvqsqcdg/sAGpBvM+8S3UICj2d73OI8ID2nJHPapg4n5 U3Mg== 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 h188-20020a636cc5000000b0051f047acf17si10356261pgc.525.2023.05.15.23.27.35; Mon, 15 May 2023 23:27:47 -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 S230140AbjEPGVr (ORCPT + 99 others); Tue, 16 May 2023 02:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbjEPGVg (ORCPT ); Tue, 16 May 2023 02:21:36 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDAA32D42; Mon, 15 May 2023 23:21:34 -0700 (PDT) Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QL5gx2DsrzLmDK; Tue, 16 May 2023 14:20:13 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 16 May 2023 14:21:32 +0800 From: Kefeng Wang To: Andrew Morton , Mike Rapoport , CC: David Hildenbrand , Oscar Salvador , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Luis Chamberlain , Kees Cook , Iurii Zaikin , , , , , Kefeng Wang Subject: [PATCH v2 05/13] mm: page_alloc: squash page_is_consistent() Date: Tue, 16 May 2023 14:38:13 +0800 Message-ID: <20230516063821.121844-6-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230516063821.121844-1-wangkefeng.wang@huawei.com> References: <20230516063821.121844-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500001.china.huawei.com (7.185.36.107) 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 Squash the page_is_consistent() into bad_range() as there is only one caller. Reviewed-by: Mike Rapoport (IBM) Signed-off-by: Kefeng Wang --- mm/page_alloc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 84ba6cca3b3a..1bd8b7832d40 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -517,13 +517,6 @@ static int page_outside_zone_boundaries(struct zone *zone, struct page *page) return ret; } -static int page_is_consistent(struct zone *zone, struct page *page) -{ - if (zone != page_zone(page)) - return 0; - - return 1; -} /* * Temporary debugging check for pages not lying within a given zone. */ @@ -531,7 +524,7 @@ static int __maybe_unused bad_range(struct zone *zone, struct page *page) { if (page_outside_zone_boundaries(zone, page)) return 1; - if (!page_is_consistent(zone, page)) + if (zone != page_zone(page)) return 1; return 0; -- 2.35.3