From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
<linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-ia64@vger.kernel.org>, <linux-sh@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
"Dave Hansen" <dave.hansen@linux.intel.com>, <linux-mm@kvack.org>,
Guo Ren <guoren@kernel.org>, <sparclinux@vger.kernel.org>,
<linux-riscv@lists.infradead.org>,
Jonas Bonn <jonas@southpole.se>, <linux-s390@vger.kernel.org>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
<linux-hexagon@vger.kernel.org>,
Huacai Chen <chenhuacai@kernel.org>,
"Russell King" <linux@armlinux.org.uk>,
<linux-csky@vger.kernel.org>, Ingo Molnar <mingo@redhat.com>,
<linux-snps-arc@lists.infradead.org>,
<linux-xtensa@linux-xtensa.org>,
Heiko Carstens <hca@linux.ibm.com>,
<linux-um@lists.infradead.org>, <linux-m68k@lists.linux-m68k.org>,
<openrisc@lists.librecores.org>,
<linux-arm-kernel@lists.infradead.org>,
Richard Henderson <rth@twiddle.net>,
<linux-parisc@vger.kernel.org>, <linux-mips@vger.kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
<linux-alpha@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] mm: Move mem_init_print_info() into mm_init()
Date: Tue, 16 Mar 2021 23:04:01 +0800 [thread overview]
Message-ID: <c4bac0d9-d61f-afcd-0ea1-d8bc65993706@huawei.com> (raw)
In-Reply-To: <26cca1c0-bd38-3d5b-5ca4-44081c444396@csgroup.eu>
On 2021/3/16 22:47, Christophe Leroy wrote:
>
>
> Le 16/03/2021 à 15:26, Kefeng Wang a écrit :
>> mem_init_print_info() is called in mem_init() on each architecture,
>> and pass NULL argument, cleanup it by using void argument and move
>> it into mm_init().
>>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
>> ---
>> arch/alpha/mm/init.c | 1 -
>> arch/arc/mm/init.c | 1 -
>> arch/arm/mm/init.c | 2 --
>> arch/arm64/mm/init.c | 2 --
>> arch/csky/mm/init.c | 1 -
>> arch/h8300/mm/init.c | 2 --
>> arch/hexagon/mm/init.c | 1 -
>> arch/ia64/mm/init.c | 1 -
>> arch/m68k/mm/init.c | 1 -
>> arch/microblaze/mm/init.c | 1 -
>> arch/mips/loongson64/numa.c | 1 -
>> arch/mips/mm/init.c | 1 -
>> arch/mips/sgi-ip27/ip27-memory.c | 1 -
>> arch/nds32/mm/init.c | 1 -
>> arch/nios2/mm/init.c | 1 -
>> arch/openrisc/mm/init.c | 2 --
>> arch/parisc/mm/init.c | 2 --
>> arch/powerpc/mm/mem.c | 1 -
>> arch/riscv/mm/init.c | 1 -
>> arch/s390/mm/init.c | 2 --
>> arch/sh/mm/init.c | 1 -
>> arch/sparc/mm/init_32.c | 2 --
>> arch/sparc/mm/init_64.c | 1 -
>> arch/um/kernel/mem.c | 1 -
>> arch/x86/mm/init_32.c | 2 --
>> arch/x86/mm/init_64.c | 2 --
>> arch/xtensa/mm/init.c | 1 -
>> include/linux/mm.h | 2 +-
>> init/main.c | 1 +
>> mm/page_alloc.c | 2 +-
>> 30 files changed, 3 insertions(+), 38 deletions(-)
>>
>
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 55d938297ce6..e4a6bf69c806 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -7728,7 +7728,7 @@ unsigned long free_reserved_area(void *start,
>> void *end, int poison, const char
>> return pages;
>> }
>> -void __init mem_init_print_info(const char *str)
>> +void __init mem_init_print_info(void)
>> {
>> unsigned long physpages, codesize, datasize, rosize, bss_size;
>> unsigned long init_code_size, init_data_size;
>>
>
> And what about the 'str' in the last line of the function ?
>
> pr_info("Memory: %luK/%luK available (%luK kernel code, %luK
> rwdata, %luK rodata, %luK init, %luK bss, %luK reserved, %luK
> cma-reserved"
> #ifdef CONFIG_HIGHMEM
> ", %luK highmem"
> #endif
> "%s%s)\n",
> nr_free_pages() << (PAGE_SHIFT - 10),
> physpages << (PAGE_SHIFT - 10),
> codesize >> 10, datasize >> 10, rosize >> 10,
> (init_data_size + init_code_size) >> 10, bss_size >> 10,
> (physpages - totalram_pages() - totalcma_pages) << (PAGE_SHIFT
> - 10),
> totalcma_pages << (PAGE_SHIFT - 10),
> #ifdef CONFIG_HIGHMEM
> totalhigh_pages() << (PAGE_SHIFT - 10),
> #endif
> str ? ", " : "", str ? str : "");
oh, I send a bad version,firstly I want to split two patches, one for
function move, one for function change.
sorry, please ignore it, thanks for your remind.
>
>
> Christophe
> .
>
next prev parent reply other threads:[~2021-03-16 15:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 14:26 [PATCH] mm: Move mem_init_print_info() into mm_init() Kefeng Wang
2021-03-16 14:47 ` Christophe Leroy
2021-03-16 15:04 ` Kefeng Wang [this message]
2021-03-16 15:29 ` [PATCH RESEND] " Kefeng Wang
2021-03-16 15:45 ` Christophe Leroy
2021-03-17 1:52 ` [PATCH v2] " Kefeng Wang
2021-03-17 5:48 ` Christophe Leroy
2021-03-17 5:57 ` Kefeng Wang
2021-03-17 11:31 ` David Hildenbrand
2021-03-17 14:03 ` Anatoly Pugachev
2021-03-17 18:48 ` Dave Hansen
2021-03-18 1:01 ` Kefeng Wang
2021-03-30 13:10 ` Kefeng Wang
2021-03-31 9:28 ` Mike Rapoport
2021-03-31 9:34 ` Russell King - ARM Linux admin
2021-03-16 21:16 ` [PATCH] " Dave Hansen
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=c4bac0d9-d61f-afcd-0ea1-d8bc65993706@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=guoren@kernel.org \
--cc=hca@linux.ibm.com \
--cc=jonas@southpole.se \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux-um@lists.infradead.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@redhat.com \
--cc=openrisc@lists.librecores.org \
--cc=palmer@dabbelt.com \
--cc=peterz@infradead.org \
--cc=rth@twiddle.net \
--cc=sparclinux@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/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).