Message ID | 20230516063821.121844-6-wangkefeng.wang@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp211059vqo; Mon, 15 May 2023 23:22:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5bjcuZItmsEknV9JPO+fXtlsgN9kfU8cZwrFXgzZfQk6KIe6ZP6Pvr7GHn+lCwoRY7E4jQ X-Received: by 2002:a17:902:cec8:b0:1ac:5c53:2c1b with SMTP id d8-20020a170902cec800b001ac5c532c1bmr36854035plg.66.1684218155675; Mon, 15 May 2023 23:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684218155; cv=none; d=google.com; s=arc-20160816; b=VIevUAOqWdWu1IC9Ar6UHlfuJVj1jeee2XVAcE8yl2z2dveAOv0pDqSZrTCqS/6/3D +yNgpi6DSD+0gmTNf16OC2sb+EWOhkgjV/K+BXhJwcJlxmvz3fTnGTV7NVZPLMA1kbTi 3xvS+mm+5w9/T0IQzosKKy/sZiiim8XnHfzroOX4U35TFFXOsg7J1pD5T2r3y734Sgo5 ydZU+Rvp2tDX+CPlCQ5+rmne1tot2UAt+MxD81OF3Pg4DjIVDpEPDSh04QYjbwxnq2XT eNFpUjkBwl7SkoLMO54IQHpxTwO0KCm7QARqBmv+0T64qgsKKFkpebxT+IeOo4oqT8CU njyw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gj8-20020a17090b108800b00250c15dbed0si1066990pjb.84.2023.05.15.23.22.23; Mon, 15 May 2023 23:22:35 -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 S230141AbjEPGVr (ORCPT <rfc822;peekingduck44@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <wangkefeng.wang@huawei.com> To: Andrew Morton <akpm@linux-foundation.org>, Mike Rapoport <rppt@kernel.org>, <linux-mm@kvack.org> CC: David Hildenbrand <david@redhat.com>, Oscar Salvador <osalvador@suse.de>, "Rafael J. Wysocki" <rafael@kernel.org>, Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>, Luis Chamberlain <mcgrof@kernel.org>, Kees Cook <keescook@chromium.org>, Iurii Zaikin <yzaikin@google.com>, <linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>, <ying.huang@intel.com>, Kefeng Wang <wangkefeng.wang@huawei.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766030736718917394?= X-GMAIL-MSGID: =?utf-8?q?1766030736718917394?= |
Series |
mm: page_alloc: misc cleanup and refector
|
|
Commit Message
Kefeng Wang
May 16, 2023, 6:38 a.m. UTC
Squash the page_is_consistent() into bad_range() as there is only one caller. Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- 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;