From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Kefeng Wang <wangkefeng.wang@huawei.com>,
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 RESEND] mm: Move mem_init_print_info() into mm_init()
Date: Tue, 16 Mar 2021 16:45:19 +0100 [thread overview]
Message-ID: <4d488195-7281-9238-b30d-9f89a6100fb9@csgroup.eu> (raw)
In-Reply-To: <20210316152901.70662-1-wangkefeng.wang@huawei.com>
Le 16/03/2021 à 16:29, Kefeng Wang a écrit :
> mem_init_print_info() is called in mem_init() on each architecture,
> and pass NULL argument, so using void argument and move it into mm_init().
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>
> Resend with 'str' line cleanup, and only test on ARM64 qemu.
>
> 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 | 6 +++---
> 30 files changed, 5 insertions(+), 40 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 55d938297ce6..cf5a2114c6d4 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;
> @@ -7767,7 +7767,7 @@ void __init mem_init_print_info(const char *str)
> #ifdef CONFIG_HIGHMEM
> ", %luK highmem"
> #endif
> - "%s%s)\n",
> + "%s)\n",
> nr_free_pages() << (PAGE_SHIFT - 10),
> physpages << (PAGE_SHIFT - 10),
> codesize >> 10, datasize >> 10, rosize >> 10,
> @@ -7777,7 +7777,7 @@ void __init mem_init_print_info(const char *str)
> #ifdef CONFIG_HIGHMEM
> totalhigh_pages() << (PAGE_SHIFT - 10),
> #endif
> - str ? ", " : "", str ? str : "");
> + "");
> }
>
> /**
>
What is the benefit of a %s to print a constant "" ?
You should tidy up completely.
Christophe
next prev parent reply other threads:[~2021-03-16 15:45 UTC|newest]
Thread overview: 18+ 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
2021-03-16 15:29 ` [PATCH RESEND] " Kefeng Wang
2021-03-16 15:45 ` Christophe Leroy [this message]
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 18:01 ` [PATCH] " kernel test robot
2021-03-17 2:11 ` Kefeng Wang
2021-03-16 21:16 ` 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=4d488195-7281-9238-b30d-9f89a6100fb9@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--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=wangkefeng.wang@huawei.com \
--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).