Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3308797pxb; Tue, 19 Jan 2021 20:59:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwV05w35oAibGc9ELx8BLBrVdDDQjz3m0xMEuxMGKOk9PEIwOc5VVwaIJtaKNYWSGUQEkt X-Received: by 2002:a17:906:65a:: with SMTP id t26mr4796744ejb.394.1611118796333; Tue, 19 Jan 2021 20:59:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611118796; cv=none; d=google.com; s=arc-20160816; b=NWAwGKhzLcW4D7RX8PRio9VMlz/tUvwjAkqXOzwl2A6GlvIjU3G7BY1FCfdh5w/uWl I/PA/shDbFmW2OoSe6V22gQF7RjIBWsRzo3mCnJReCnGn4Buh2LHqkJffvtJUOpRqWl6 DWOfkkWk9t/h2XEPr/R+m397ueFd8lhrzXL5w5jgQZ+PFd+05VfO4pf64GaXvPzd6BEN 69sESfBxS5F9lCiNpSWp09RKaZOVv9g+orVYYHu+jL0iyx5vd3pftgxeaX0bOhV+Ra2p S3D3KEpl3wpFhG64fWz0RRmMd8gOwfpMmxtTCHVuCMAAyALZmsfB2sqYcJlqyL2y5xdO 8QGQ== 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=V4MAmW9o9TEkOOmhJwAHh/aM9Qgr24vL7t9KpVWFRYk=; b=u1XcYuTgUv6Btu/TKpmT0zq6ICd0sRx7vAm3UBKQvkdx1Z7k1635RVh7Axwj6aUL2X uD69rA2HFt7WTFOWKMBEBT0Hf77Ca6/UTrDIueh9bluhIdfZGStEoypCJCEEOpsealmK 5iFc5SqFzQXISViZj5U9i+DboEJeyLQqLHIkTalFVsL6wPqxSVTbQhRaz1N4g2hJWpy0 3d5bqSw6e/WjCQ73C7wY3S9VQZDqNksvPnPPPNimuk0bU6Jh5Tz7rfSUArASPyMNlZ61 WoGBxTzShqZ1Rj4SNQ6y8NfwM90ZD/6iEmkIHipmsZgQzs/Oh0pFqAY1hwUN3r6BOilW 9DDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CPGFFj5s; 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 h18si314021ejk.90.2021.01.19.20.59.32; Tue, 19 Jan 2021 20:59:56 -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=CPGFFj5s; 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 S1728240AbhATEyn (ORCPT + 99 others); Tue, 19 Jan 2021 23:54:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:36803 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727123AbhATEyC (ORCPT ); Tue, 19 Jan 2021 23:54:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611118356; 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=V4MAmW9o9TEkOOmhJwAHh/aM9Qgr24vL7t9KpVWFRYk=; b=CPGFFj5swBTf4CsKcd69nH04Y2P8Z8RlJTRidqfFRnCVL4Z6d8XMuRx2Bg/lr9sH14CgHZ kq6HxyI7f32X9cGGl2mknQ0R09z2Omo/bqAOeAAdWNHCkFiG6rjvAPUfrPy1PN2HnyylBj GT7x5Lv7FuS8ZLWe5ki1mtTgo0E/8YI= 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-476-XXBuItvKPXCIvTiEkUVjrA-1; Tue, 19 Jan 2021 23:52:34 -0500 X-MC-Unique: XXBuItvKPXCIvTiEkUVjrA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F3302801817; Wed, 20 Jan 2021 04:52:32 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-59.pek2.redhat.com [10.72.12.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEBE660D11; Wed, 20 Jan 2021 04:52:30 +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 v4 4/4] mm: remove unneeded local variable in free_area_init_core Date: Wed, 20 Jan 2021 12:52:13 +0800 Message-Id: <20210120045213.6571-5-bhe@redhat.com> In-Reply-To: <20210120045213.6571-1-bhe@redhat.com> References: <20210120045213.6571-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 Reviewed-by: David Hildenbrand --- 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 69cf19baac12..e0df67948ace 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6923,7 +6923,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; @@ -6972,7 +6971,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