[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d488195-7281-9238-b30d-9f89a6100fb9@csgroup.eu>
Date: Tue, 16 Mar 2021 16:45:19 +0100
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Kefeng Wang <wangkefeng.wang@...wei.com>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-ia64@...r.kernel.org, linux-sh@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Catalin Marinas <catalin.marinas@....com>,
Dave Hansen <dave.hansen@...ux.intel.com>, linux-mm@...ck.org,
Guo Ren <guoren@...nel.org>, sparclinux@...r.kernel.org,
linux-riscv@...ts.infradead.org, Jonas Bonn <jonas@...thpole.se>,
linux-s390@...r.kernel.org,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
linux-hexagon@...r.kernel.org, Huacai Chen <chenhuacai@...nel.org>,
Russell King <linux@...linux.org.uk>,
linux-csky@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
linux-snps-arc@...ts.infradead.org, linux-xtensa@...ux-xtensa.org,
Heiko Carstens <hca@...ux.ibm.com>,
linux-um@...ts.infradead.org, linux-m68k@...ts.linux-m68k.org,
openrisc@...ts.librecores.org,
linux-arm-kernel@...ts.infradead.org,
Richard Henderson <rth@...ddle.net>,
linux-parisc@...r.kernel.org, linux-mips@...r.kernel.org,
Palmer Dabbelt <palmer@...belt.com>,
linux-alpha@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH RESEND] mm: Move mem_init_print_info() into mm_init()
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@...wei.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
Powered by blists - more mailing lists