public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, x86@kernel.org
Subject: Re: [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap
Date: Tue, 24 Oct 2017 15:29:00 +0200	[thread overview]
Message-ID: <20171024132900.nxftpzwbuifon7tk@gmail.com> (raw)
In-Reply-To: <1508849249-18035-1-git-send-email-bhe@redhat.com>


* Baoquan He <bhe@redhat.com> wrote:

> For register_page_bootmem_memmap(), the 3rd argument 'size' indicates
> the number of pages which are inside the memory section, not a size.
> 
> Signed-off-by: Baoquan He <bhe@redhat.com>
> ---
>  arch/x86/mm/init_64.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 048fbe8fc274..f5aa0d7c4cd1 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -1426,10 +1426,10 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node)
>  
>  #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HAVE_BOOTMEM_INFO_NODE)
>  void register_page_bootmem_memmap(unsigned long section_nr,
> -				  struct page *start_page, unsigned long size)
> +				  struct page *start_page, unsigned long nr_pages)
>  {
>  	unsigned long addr = (unsigned long)start_page;
> -	unsigned long end = (unsigned long)(start_page + size);
> +	unsigned long end = (unsigned long)(start_page + nr_pages);
>  	unsigned long next;
>  	pgd_t *pgd;
>  	p4d_t *p4d;

This doesn't build on x86-64 allyesconfig:

arch/x86/mm/init_64.c: In function ‘register_page_bootmem_memmap’:
arch/x86/mm/init_64.c:1438:15: error: ‘nr_pages’ redeclared as different kind of symbol
arch/x86/mm/init_64.c:1429:46: note: previous definition of ‘nr_pages’ was here

Also note that I improved the changelog (see below), could you please pick those 
changes up for a v2 submission?

Thanks,

	Ingo

==================>
>From 67780ebe5c99190d2a946de106bd0c7b83e11b68 Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Tue, 24 Oct 2017 20:47:29 +0800
Subject: [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages'

register_page_bootmem_memmap()'s 3rd 'size' parameter is named
in a somewhat misleading fashion - rename it to 'nr_pages' which
makes the units of it much clearer.

Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Link: http://lkml.kernel.org/r/1508849249-18035-1-git-send-email-bhe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/mm/init_64.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 048fbe8fc274..f5aa0d7c4cd1 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -1426,10 +1426,10 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node)
 
 #if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_HAVE_BOOTMEM_INFO_NODE)
 void register_page_bootmem_memmap(unsigned long section_nr,
-				  struct page *start_page, unsigned long size)
+				  struct page *start_page, unsigned long nr_pages)
 {
 	unsigned long addr = (unsigned long)start_page;
-	unsigned long end = (unsigned long)(start_page + size);
+	unsigned long end = (unsigned long)(start_page + nr_pages);
 	unsigned long next;
 	pgd_t *pgd;
 	p4d_t *p4d;

  reply	other threads:[~2017-10-24 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 12:47 [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap Baoquan He
2017-10-24 13:29 ` Ingo Molnar [this message]
2017-10-24 13:34   ` Baoquan He
2017-10-27 15:51   ` [PATCH] x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages' kbuild test robot
2017-10-27 23:45     ` Baoquan He
2017-10-26  6:33 ` [PATCH] x86/mm/64: Rename the argument 'size' as 'nr_pages' in register_page_bootmem_memmap kbuild test robot
2017-10-26  6:58   ` 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=20171024132900.nxftpzwbuifon7tk@gmail.com \
    --to=mingo@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.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