Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6081152rwr; Tue, 9 May 2023 09:59:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6OFouCLPEFxrdfN7v0pt3Yb9gAVr+OjiaarzbNbDMojH4CmKFsVHy01Fm2bAqtnU8Z96aw X-Received: by 2002:a17:903:806:b0:1a0:549d:399e with SMTP id kr6-20020a170903080600b001a0549d399emr13712639plb.21.1683651543339; Tue, 09 May 2023 09:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683651543; cv=none; d=google.com; s=arc-20160816; b=kx/2dxy/GsVuxBbV0vBqXT0JntM3uwMF3Xz7o/DR2a6k3iJrg6wktpVFffjTSiWwS8 PfkW4EZRV/BXVEO/KdOpFGyQzA8N10OlMSOi8w7EFT8OyraU8HqBM4S+3tpitDfmQnAd EotU+EGEEHv2u2Oj2UeqRI/kcu8eaIpYmTTrPcJyTVNKOjtcikdMzB+i1QZAxOIu0waN kcRwBf30ybHKKGqmSq4R80Spc2+XnoqZBlKiX1eDpQv1+/T8/c/p6K53tJrKPgC1iq3l RyLtNY7czu17gzMPdAnb7ofHzHgNHrBg48xzANUXUL1xOPmPu1P/QMFUWZKBKgwBl4H9 ju4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wOOxgLH7twDjF39Xnd024gW9rj6NCQA/u6ltoAZRj48=; b=Psa7VuKB3jo21UY+Y90vpRuxdSXI4bfvqF47VsVTULVz9vFOG8dPzbK7ozwYavopiC MzMyAe3cx9l4u8kh1X4RuWp0NaOqCOQrUSeWMGf0Il2zJ1AfediWKZu7yosJPfmdg51W L/FjxvfneiKMIMZyJyoU8AXCDeiLS9HdiRqyL2BkrD37T0lv7V2ov0pF61VtNVKQ5Koj rDo2n5dHzExSCit/a7Dzw18+fOj54aUxOl+J1bx9nHNpP9pEC7/A21/2yppB1Un38/6M FP0bm3kez/g7p8+wdHgOFzS354NN30eWoymDKNSOjYL9Caewb3BeDTJo2MF2pZJIz+Kz /q8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tHZcLTJ6; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m21-20020a170902bb9500b001a220a984f9si1775773pls.546.2023.05.09.09.58.51; Tue, 09 May 2023 09:59:03 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tHZcLTJ6; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233120AbjEIQnv (ORCPT + 99 others); Tue, 9 May 2023 12:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229708AbjEIQnu (ORCPT ); Tue, 9 May 2023 12:43:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70B0E1BD3; Tue, 9 May 2023 09:43:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 053F462C5C; Tue, 9 May 2023 16:43:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4528C433EF; Tue, 9 May 2023 16:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683650628; bh=GH4ozPy6BUps1/YzqMqfSKcfN/+aGxS7E5VYZMBfEkg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tHZcLTJ6DhykdVVMqHJKEDZm2sxaYZVHw0gZWB8Q2QiIf9fGDT+Ii/NXmKjks2rg4 9L3hMi4JKoEbtWSM5aR0t9iz+mvr97o7YV8lEYhrg95CfDcf3na0yv/OwaW7ct/QQE xtOapeboqMo+rZ8zieUimyvOKnnG0ZTzMdjIaYfVlxK3IARoSXgIrTDo8zQsiVx2II lN6KQB4U+RpSNFKHXFxWEIK6/1ewhUl3BDYu1f60a9M3Q/PaJWzGNkK7/QU9Kv8au2 xb3ZuDsLzYM9vgzrykTdbuzqci7XtLBQJc9CTrh5moVUabH5ETISbwqpNuW9HWlal2 GYJrgl+D4PE9A== Date: Tue, 9 May 2023 09:43:45 -0700 From: Mike Rapoport To: Kefeng Wang Cc: Andrew Morton , linux-mm@kvack.org, David Hildenbrand , Oscar Salvador , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Luis Chamberlain , Kees Cook , Iurii Zaikin , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 05/12] mm: page_alloc: squash page_is_consistent() Message-ID: <20230509164345.GC4135@kernel.org> References: <20230508071200.123962-1-wangkefeng.wang@huawei.com> <20230508071200.123962-6-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230508071200.123962-6-wangkefeng.wang@huawei.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Mon, May 08, 2023 at 03:11:53PM +0800, Kefeng Wang wrote: > Squash the page_is_consistent() into bad_range() as there is > only one caller. > > Signed-off-by: Kefeng Wang Reviewed-by: Mike Rapoport (IBM) > --- > 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 9a85238f1140..348dcbaca757 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 >