Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14423242pxu; Tue, 5 Jan 2021 00:46:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRhyBsusn//kg53IkrBQDWRicOYjfnsbgaUTVwypu6nrUQgK4qkgKGp5eJlBxR9BKZWOsb X-Received: by 2002:a50:d5d5:: with SMTP id g21mr77099765edj.41.1609836413569; Tue, 05 Jan 2021 00:46:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609836413; cv=none; d=google.com; s=arc-20160816; b=woQI4doxOOspMlybrBAZmVVQk2ET9pO2LIy9vaD15JuIE4cuYuka2j2tsBCvcQJA2d hIF9CUeh1KuBgup/so2nXJtk0SksqFI/v5b3AMk8fEXXNakmDrv03x/LGXGaumVpabxc FEM4gD/u37FprEoBUmdSaYY5jfJputOCNGcMmEcnaZv8UPCU239iArZrNA32umlypb4U v4mFF7siqHT+glIjSzSmCpAnJaXJ+Bu2RxLT7tPoPNpgK/6yCNc+b5fiP0hrc7Zg3srF K3fAVnUZWGUKI4f4NRnA1wvcPQRTtMPfaiwWvOG1zQ0ayikUjObKABQgCBmGVbNKlPUX zzdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=XIQjm85waNu2DaAUZ4nRwaahypJ7KcL7+iJQfZLah8o=; b=tVo0MbjUqpiKt3DhrqbWw3MQ9tmdvIBYE25lgXIRBHKkq9HEV2HtOw6pQysgNqNQlX GWl3T9tSFi4+kRtAfJlwCdF+S5DAENsXm73AA7DCa6GTuDaZYsCEuHABmzBW9Q/FipEE dJN2QOlb1a+EBaTKTF4NwOKzuPi8V4QxtmikM7CD1XHG23Zc1kIq3sSWZsPo324szW91 cgnQhSs32quCQHfESTiRlVH5MSGJrLEtK7a2YDHslcIcGgfQDrSakvXUZ+eP8MCWvxNp 0yimI1WzCx+WDkNNoRnJ36P9LGLR6e0aOg9nVQ+D/QySjlrsgruv9dtsksFR3WCvguD0 7DmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ca5TnoUw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs4si33240338edb.555.2021.01.05.00.46.30; Tue, 05 Jan 2021 00:46:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ca5TnoUw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727213AbhAEHtB (ORCPT + 99 others); Tue, 5 Jan 2021 02:49:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45741 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727149AbhAEHtA (ORCPT ); Tue, 5 Jan 2021 02:49:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609832854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=XIQjm85waNu2DaAUZ4nRwaahypJ7KcL7+iJQfZLah8o=; b=Ca5TnoUw2kq1U9qnaP8DKoOJSeTAjjXBLtcRKYbHL/EQWflnC3PpsPiDBk9wxzDGkOTF1Z 3mob7y8U7EydpQD6U9L50gIgXaxnW3l4gpaJSQ+NJYnWPCvqhnNtJGJcKLb2Nc+F2+XltH CrtRmZk2zo1vKsZFAbnDdp7TVGUPvsQ= 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-485-VOn2FcFUM2Ok6SKyXak3Fw-1; Tue, 05 Jan 2021 02:47:31 -0500 X-MC-Unique: VOn2FcFUM2Ok6SKyXak3Fw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC8AF107ACF8; Tue, 5 Jan 2021 07:47:29 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-13-56.pek2.redhat.com [10.72.13.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52A9871C91; Tue, 5 Jan 2021 07:47:27 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, rppt@kernel.org, david@redhat.com, bhe@redhat.com Subject: [PATCH v3 4/4] mm: remove unneeded local variable in free_area_init_core Date: Tue, 5 Jan 2021 15:47:08 +0800 Message-Id: <20210105074708.18483-5-bhe@redhat.com> In-Reply-To: <20210105074708.18483-1-bhe@redhat.com> References: <20210105074708.18483-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } } -- 2.17.2