From: Mike Rapoport <rppt@kernel.org>
To: Baoquan He <bhe@redhat.com>
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
Date: Mon, 21 Dec 2020 08:35:09 +0200 [thread overview]
Message-ID: <20201221063509.GG392325@kernel.org> (raw)
In-Reply-To: <20201220082754.6900-6-bhe@redhat.com>
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 <bhe@redhat.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
> 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.
next prev parent reply other threads:[~2020-12-21 6:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-20 8:27 [PATCH v2 0/5] Fix the incorrect memmep defer init handling and do some cleanup Baoquan He
2020-12-20 8:27 ` [PATCH v2 1/5] mm: memmap defer init dosn't work as expected Baoquan He
2020-12-21 6:32 ` Mike Rapoport
2020-12-20 8:27 ` [PATCH v2 2/5] mm: rename memmap_init() and memmap_init_zone() Baoquan He
2020-12-21 6:33 ` Mike Rapoport
2020-12-20 8:27 ` [PATCH v2 3/5] mm: simplify parater of function memmap_init_zone() Baoquan He
2020-12-21 6:34 ` Mike Rapoport
2020-12-20 8:27 ` [PATCH v2 4/5] mm: simplify parameter of setup_usemap() Baoquan He
2020-12-21 6:34 ` Mike Rapoport
2020-12-20 8:27 ` [PATCH v2 5/5] mm: remove unneeded local variable in free_area_init_core Baoquan He
2020-12-21 6:35 ` Mike Rapoport [this message]
2020-12-23 1:46 ` [PATCH v2 0/5] Fix the incorrect memmep defer init handling and do some cleanup Andrew Morton
2020-12-23 2:05 ` Baoquan He
2020-12-23 8:12 ` Baoquan He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201221063509.GG392325@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=david@redhat.com \
--cc=gopakumarr@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).