From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D36C433E0 for ; Tue, 5 Jan 2021 16:44:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E903C22CB9 for ; Tue, 5 Jan 2021 16:44:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E903C22CB9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1858D8D0084; Tue, 5 Jan 2021 11:44:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1368E8D006E; Tue, 5 Jan 2021 11:44:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0256B8D0084; Tue, 5 Jan 2021 11:44:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0022.hostedemail.com [216.40.44.22]) by kanga.kvack.org (Postfix) with ESMTP id E219B8D006E for ; Tue, 5 Jan 2021 11:44:13 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6F2C9362D for ; Tue, 5 Jan 2021 16:44:13 +0000 (UTC) X-FDA: 77672293986.11.bell78_450c317274da Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 29BB6180F8B86 for ; Tue, 5 Jan 2021 16:44:13 +0000 (UTC) X-HE-Tag: bell78_450c317274da X-Filterd-Recvd-Size: 3681 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Jan 2021 16:44:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609865051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EQ/JWdP+ZPuOVG9p+BYjTh339vKnJxeTgO0ZBYjWFtI=; b=i89VY3vyJZMdbsUBCq8SYXwR6Kq617HfEILVQJYZf5AExZruSlow4hm6DlTVG5fMwJakNN cnB33GFdImUO3/jA7SzxpPqZXk4iTOoccpg/Fg5VNJZQUhd4onalHsljqQ+Q6psiHRTmxx lpFKCLFjBkl/lgSnc+9cRpxIZzdTYDQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-6-ucwlct3CO_SlGuFY5Y0V9A-1; Tue, 05 Jan 2021 11:44:07 -0500 X-MC-Unique: ucwlct3CO_SlGuFY5Y0V9A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5FC4F190A7A0; Tue, 5 Jan 2021 16:44:06 +0000 (UTC) Received: from [10.36.114.117] (ovpn-114-117.ams2.redhat.com [10.36.114.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34A8C5D735; Tue, 5 Jan 2021 16:44:05 +0000 (UTC) Subject: Re: [PATCH v3 4/4] mm: remove unneeded local variable in free_area_init_core To: Baoquan He , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, rppt@kernel.org References: <20210105074708.18483-1-bhe@redhat.com> <20210105074708.18483-5-bhe@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <1bb89972-a942-e196-577c-aedb71aef8ee@redhat.com> Date: Tue, 5 Jan 2021 17:44:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210105074708.18483-5-bhe@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 05.01.21 08:47, Baoquan He wrote: > Local variable 'zone_start_pfn' is not needed since there's only > one call site in free_area_init_core(). Let's remove it and pass > zone->zone_start_pfn directly to init_currently_empty_zone(). > > Signed-off-by: Baoquan He > Reviewed-by: Mike Rapoport > --- > mm/page_alloc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index e0ce6fb6373b..9cacb8652239 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -6986,7 +6986,6 @@ static void __init free_area_init_core(struct pglist_data *pgdat) > for (j = 0; j < MAX_NR_ZONES; j++) { > struct zone *zone = pgdat->node_zones + j; > unsigned long size, freesize, memmap_pages; > - unsigned long zone_start_pfn = zone->zone_start_pfn; > > size = zone->spanned_pages; > freesize = zone->present_pages; > @@ -7035,7 +7034,7 @@ static void __init free_area_init_core(struct pglist_data *pgdat) > > set_pageblock_order(); > setup_usemap(zone); > - init_currently_empty_zone(zone, zone_start_pfn, size); > + init_currently_empty_zone(zone, zone->zone_start_pfn, size); > memmap_init_zone(zone); > } > } > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb