Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3931322pxu; Sun, 20 Dec 2020 22:38:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcpkL/Je56u0RKKXU7RNZfOx6peaFHVcciOmJSNvJFC33sMu9o4KqSLhjJIp80SUlZlGkl X-Received: by 2002:a17:906:b309:: with SMTP id n9mr14113599ejz.365.1608532680244; Sun, 20 Dec 2020 22:38:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608532680; cv=none; d=google.com; s=arc-20160816; b=rF8pE4gryfpqxqmDPh9vWT/OGAnIz7JBOrlg33JtcmXNaLbC3vdFjbr3haLOQDLfx4 DbHVF0gx7DPyzRK/5bzHA6JSMoxkaY/GFy7YlEZPFMdFAuD7AvZP2Gp5yibzTuJDDDT4 QT66vtSJVIuA7m8eGUw1hDwZBV+zHmRYyGyuCB2wWvgqVDlMVK5b9dty5HzD+aa/l4bQ wvJxUbb/fQuvRzAmvGupyATR2OfZv0HSFYLkfry2KSs8RuULk9ew3+FdY03OKBpcCvOo ozZTsWhU8LGecPACT6AS95qpn2PIp3pDl/9mwUcESAbWvGi9vHXOdpxHYBi5bbGyh/+M hwNQ== 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:dkim-signature:date; bh=ruO9rIgeFmr7QnH131pI3YtEWFtY4xeCBVBqNQ4rN4o=; b=j0LFlX0oqnO6yCjOcvmrzjk6EBsZoVAsr4FW0NltSNb6b3wb6JL/wndmFh6VnIDQ86 hT1pSlFTMCXed3Q8NQNdiS6rJq8UsKD5VXjeTeYinBrWqiGRIOSBsT3icgeTRL+fLAaF 707S9axAZ24tOLdW9NgNjASBXO+tGPYzQ7YsmF6/BSj8+9KOfZImMkMZIhkybqojasRE RpHk9z4VW12SdJ2m10p1WDZ1AsN8I4U6PW2N2UcX61DNfZlV2vlWg5NBV5OLp5TtKkYB 2OC8Td7BdCymOFMed+9ixb/WebeKCXU9iqeLlsoGuWcxgFNxZOaeTu8Z1KtiooCc3rux 54tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OMF06ym1; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si10597254ede.232.2020.12.20.22.37.37; Sun, 20 Dec 2020 22:38:00 -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=@kernel.org header.s=k20201202 header.b=OMF06ym1; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728564AbgLUGf5 (ORCPT + 99 others); Mon, 21 Dec 2020 01:35:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:46088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbgLUGf5 (ORCPT ); Mon, 21 Dec 2020 01:35:57 -0500 Date: Mon, 21 Dec 2020 08:35:09 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608532516; bh=CDzFFK1gZq+ZpVRYJf1GjMW3wuMU9Dcb6QR1oomaDfM=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=OMF06ym19B/k2FQ2dIssmTAfwFEO/FxjVmoA6sZJ3fyaohMGhiAnlt57zPB0j75kM aOWGpRr9uhBmdyO79DEar2tM4wz5kKA79Hrnfxf0haI9yiRiWgGjqkAgq1OkBznrp6 s+r+lGPBDXs62/ZJdam993Zf12zjt+o9iDon0+idOFVsbBvSKR/bYCDo1YFKIkyTpI DLhniYs2Grw3DTzVFIMI5hJ5GqpRgY8I3mWnM6upskVu2FY18DJEbC2U48QeyDF77b f99Z4UabATOTtwxPCzA70lrDNv0sCsWFvYYAvkoW9qneIAxpdw+A9XTU9fs2F2iNpq xEve3WA9sjQgQ== From: Mike Rapoport To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, gopakumarr@vmware.com, david@redhat.com Subject: Re: [PATCH v2 5/5] mm: remove unneeded local variable in free_area_init_core Message-ID: <20201221063509.GG392325@kernel.org> References: <20201220082754.6900-1-bhe@redhat.com> <20201220082754.6900-6-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201220082754.6900-6-bhe@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 20, 2020 at 04:27:54PM +0800, 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 7f0a917ab858..189a86253c93 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 > -- Sincerely yours, Mike.