Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7851233rwp; Wed, 19 Jul 2023 00:58:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlE9XKPdt6vrVx+Z5IjDpkSG4sxsRBhl3nexBibrnhn6H4MqtaBKpygJSSmx/2DLZyW2EUCg X-Received: by 2002:a05:6358:52c1:b0:134:d282:92e9 with SMTP id z1-20020a05635852c100b00134d28292e9mr19162857rwz.29.1689753486131; Wed, 19 Jul 2023 00:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689753486; cv=none; d=google.com; s=arc-20160816; b=a3iifvrQBBSmM4EIvROOX03TS9Td6xIytS/L2cp1uAeNia5SX9TjL+Jdq2QVbtp8Zu IrfTgZp9T4h71CquwpJ7RPcn1yzgmUkh1V9sui4FlxJPk0l6Nf54gDhmxUlgzi7L6qrf KV/v7AMBvXCTrwtBPCOJgHGP3EUisIuYNAqEiQe6nEyKLBGzE5gh1OCflnPebBvkfFfc Vs/u9Ist44qTKMH6XD4ppknXM33T5hS3ZMLRJSYuB4V4jkjrKu2IrRGmXGNYNzMprFtZ qoZQCuJaHX79REHQEnzBeRIhT+zZJCrGRca17Kuo0+40GVz1DGDiFtLe5zw43T3wslG3 5eFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=kZnfnJCnF7636FlKlqqUUdtvtBbpidcyKmQaXK/2hbQ=; fh=6JkLsQNh8t7QCnanyoUzwLCp1Am7gV5cvseuyPLHqrY=; b=OsHVjxH4qjltDRqZXtk5z3yOOARINagqbIIqzNHauECYdxwVY4oJhCguhm7jzG/Vjd QbG+SlT+LQ62ylxE5FswPdyWAVA4RJUr42bZTvE4Oubquyz/DmKeSxWX+D9sO607Z5mo DjfS2KzeyvKdPc6VF6QgDI1zWKfzozdqW3etE/bKh8BiXCiHdBDYi7E4HbamIy+X3jVA 3tJU0qquDPKkB4O2pMZMN3wP9E5neKnTKyup0ypqBb2Qa10C83I3AoF0rZjucwkNEOv5 6xQwOuMqaQKXHMj1/ef5XsTpgRTIsgeTHkn9AEf6Ti8ig1fDPassKSpgLun2IlFBeSdS LZ7g== 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=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv125-20020a632e83000000b0055c8d01ad16si2992099pgb.265.2023.07.19.00.57.53; Wed, 19 Jul 2023 00:58:06 -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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229786AbjGSHtC (ORCPT + 99 others); Wed, 19 Jul 2023 03:49:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbjGSHtA (ORCPT ); Wed, 19 Jul 2023 03:49:00 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A759AE43 for ; Wed, 19 Jul 2023 00:48:58 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5E4152F4; Wed, 19 Jul 2023 00:49:41 -0700 (PDT) Received: from [10.162.40.17] (unknown [10.162.40.17]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 758CE3F738; Wed, 19 Jul 2023 00:48:56 -0700 (PDT) Message-ID: <397768bc-b861-1f6e-4c12-8fbbdff0900f@arm.com> Date: Wed, 19 Jul 2023 13:18:53 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable() Content-Language: en-US To: Haifeng Xu , rppt@kernel.org Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20230717065811.1262-1-haifeng.xu@shopee.com> From: Anshuman Khandual In-Reply-To: <20230717065811.1262-1-haifeng.xu@shopee.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,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 7/17/23 12:28, Haifeng Xu wrote: > node_start_pfn is not used in adjust_zone_range_for_zone_movable(), so > it is pointless to waste a function argument. Drop the parameter. > > Signed-off-by: Haifeng Xu Reviewed-by: Anshuman Khandual > --- > mm/mm_init.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/mm/mm_init.c b/mm/mm_init.c > index a313d1828a6c..23d50541e1f7 100644 > --- a/mm/mm_init.c > +++ b/mm/mm_init.c > @@ -1105,7 +1105,6 @@ void __ref memmap_init_zone_device(struct zone *zone, > */ > static void __init adjust_zone_range_for_zone_movable(int nid, > unsigned long zone_type, > - unsigned long node_start_pfn, > unsigned long node_end_pfn, > unsigned long *zone_start_pfn, > unsigned long *zone_end_pfn) > @@ -1222,9 +1221,8 @@ static unsigned long __init zone_spanned_pages_in_node(int nid, > /* Get the start and end of the zone */ > *zone_start_pfn = clamp(node_start_pfn, zone_low, zone_high); > *zone_end_pfn = clamp(node_end_pfn, zone_low, zone_high); > - adjust_zone_range_for_zone_movable(nid, zone_type, > - node_start_pfn, node_end_pfn, > - zone_start_pfn, zone_end_pfn); > + adjust_zone_range_for_zone_movable(nid, zone_type, node_end_pfn, > + zone_start_pfn, zone_end_pfn); > > /* Check that this node has pages within the zone's required range */ > if (*zone_end_pfn < node_start_pfn || *zone_start_pfn > node_end_pfn)