From: Hari Bathini <hbathini@linux.ibm.com>
To: Sourabh Jain <sourabhjain@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
Baoquan He <bhe@redhat.com>
Subject: Re: [PATCH v2 2/6] crash: remove an unused argument from reserve_crashkernel_generic()
Date: Thu, 23 Jan 2025 15:43:30 +0530 [thread overview]
Message-ID: <bb1f886a-137c-4262-a0c5-417d7063b563@linux.ibm.com> (raw)
In-Reply-To: <20250121115442.1278458-3-sourabhjain@linux.ibm.com>
On 21/01/25 5:24 pm, Sourabh Jain wrote:
> cmdline argument is not used in reserve_crashkernel_generic() so remove
> it. Correspondingly, all the callers have been updated as well.
>
> No functional change intended.
>
Looks good to me.
Acked-by: Hari Bathini <hbathini@linux.ibm.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Hari Bathini <hbathini@linux.ibm.com>
> Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
> Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: kexec@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Acked-by: Baoquan He <bhe@redhat.com>
> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
> ---
> arch/arm64/mm/init.c | 6 ++----
> arch/loongarch/kernel/setup.c | 5 ++---
> arch/riscv/mm/init.c | 6 ++----
> arch/x86/kernel/setup.c | 6 ++----
> include/linux/crash_reserve.h | 11 +++++------
> kernel/crash_reserve.c | 9 ++++-----
> 6 files changed, 17 insertions(+), 26 deletions(-)
>
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> index 9c0b8d9558fc..6c5a1ee4b5d3 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -98,21 +98,19 @@ static void __init arch_reserve_crashkernel(void)
> {
> unsigned long long low_size = 0;
> unsigned long long crash_base, crash_size;
> - char *cmdline = boot_command_line;
> bool high = false;
> int ret;
>
> if (!IS_ENABLED(CONFIG_CRASH_RESERVE))
> return;
>
> - ret = parse_crashkernel(cmdline, memblock_phys_mem_size(),
> + ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
> &crash_size, &crash_base,
> &low_size, &high);
> if (ret)
> return;
>
> - reserve_crashkernel_generic(cmdline, crash_size, crash_base,
> - low_size, high);
> + reserve_crashkernel_generic(crash_size, crash_base, low_size, high);
> }
>
> static phys_addr_t __init max_zone_phys(phys_addr_t zone_limit)
> diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c
> index 56934fe58170..ece9c4266c3f 100644
> --- a/arch/loongarch/kernel/setup.c
> +++ b/arch/loongarch/kernel/setup.c
> @@ -259,18 +259,17 @@ static void __init arch_reserve_crashkernel(void)
> int ret;
> unsigned long long low_size = 0;
> unsigned long long crash_base, crash_size;
> - char *cmdline = boot_command_line;
> bool high = false;
>
> if (!IS_ENABLED(CONFIG_CRASH_RESERVE))
> return;
>
> - ret = parse_crashkernel(cmdline, memblock_phys_mem_size(),
> + ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
> &crash_size, &crash_base, &low_size, &high);
> if (ret)
> return;
>
> - reserve_crashkernel_generic(cmdline, crash_size, crash_base, low_size, high);
> + reserve_crashkernel_generic(crash_size, crash_base, low_size, high);
> }
>
> static void __init fdt_setup(void)
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index 8d167e09f1fe..16b81beb41bf 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -1392,21 +1392,19 @@ static void __init arch_reserve_crashkernel(void)
> {
> unsigned long long low_size = 0;
> unsigned long long crash_base, crash_size;
> - char *cmdline = boot_command_line;
> bool high = false;
> int ret;
>
> if (!IS_ENABLED(CONFIG_CRASH_RESERVE))
> return;
>
> - ret = parse_crashkernel(cmdline, memblock_phys_mem_size(),
> + ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
> &crash_size, &crash_base,
> &low_size, &high);
> if (ret)
> return;
>
> - reserve_crashkernel_generic(cmdline, crash_size, crash_base,
> - low_size, high);
> + reserve_crashkernel_generic(crash_size, crash_base, low_size, high);
> }
>
> void __init paging_init(void)
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index f1fea506e20f..15b6823556c8 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -469,14 +469,13 @@ static void __init memblock_x86_reserve_range_setup_data(void)
> static void __init arch_reserve_crashkernel(void)
> {
> unsigned long long crash_base, crash_size, low_size = 0;
> - char *cmdline = boot_command_line;
> bool high = false;
> int ret;
>
> if (!IS_ENABLED(CONFIG_CRASH_RESERVE))
> return;
>
> - ret = parse_crashkernel(cmdline, memblock_phys_mem_size(),
> + ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
> &crash_size, &crash_base,
> &low_size, &high);
> if (ret)
> @@ -487,8 +486,7 @@ static void __init arch_reserve_crashkernel(void)
> return;
> }
>
> - reserve_crashkernel_generic(cmdline, crash_size, crash_base,
> - low_size, high);
> + reserve_crashkernel_generic(crash_size, crash_base, low_size, high);
> }
>
> static struct resource standard_io_resources[] = {
> diff --git a/include/linux/crash_reserve.h b/include/linux/crash_reserve.h
> index 5a9df944fb80..1fe7e7d1b214 100644
> --- a/include/linux/crash_reserve.h
> +++ b/include/linux/crash_reserve.h
> @@ -32,13 +32,12 @@ int __init parse_crashkernel(char *cmdline, unsigned long long system_ram,
> #define CRASH_ADDR_HIGH_MAX memblock_end_of_DRAM()
> #endif
>
> -void __init reserve_crashkernel_generic(char *cmdline,
> - unsigned long long crash_size,
> - unsigned long long crash_base,
> - unsigned long long crash_low_size,
> - bool high);
> +void __init reserve_crashkernel_generic(unsigned long long crash_size,
> + unsigned long long crash_base,
> + unsigned long long crash_low_size,
> + bool high);
> #else
> -static inline void __init reserve_crashkernel_generic(char *cmdline,
> +static inline void __init reserve_crashkernel_generic(
> unsigned long long crash_size,
> unsigned long long crash_base,
> unsigned long long crash_low_size,
> diff --git a/kernel/crash_reserve.c b/kernel/crash_reserve.c
> index a620fb4b2116..aff7c0fdbefa 100644
> --- a/kernel/crash_reserve.c
> +++ b/kernel/crash_reserve.c
> @@ -375,11 +375,10 @@ static int __init reserve_crashkernel_low(unsigned long long low_size)
> return 0;
> }
>
> -void __init reserve_crashkernel_generic(char *cmdline,
> - unsigned long long crash_size,
> - unsigned long long crash_base,
> - unsigned long long crash_low_size,
> - bool high)
> +void __init reserve_crashkernel_generic(unsigned long long crash_size,
> + unsigned long long crash_base,
> + unsigned long long crash_low_size,
> + bool high)
> {
> unsigned long long search_end = CRASH_ADDR_LOW_MAX, search_base = 0;
> bool fixed_base = false;
next prev parent reply other threads:[~2025-01-23 10:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 11:54 [PATCH v2 0/6] powerpc/crash: use generic crashkernel reservation Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 1/6] kexec: Initialize ELF lowest address to ULONG_MAX Sourabh Jain
2025-01-23 10:04 ` Hari Bathini
2025-01-23 11:23 ` Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 2/6] crash: remove an unused argument from reserve_crashkernel_generic() Sourabh Jain
2025-01-23 10:13 ` Hari Bathini [this message]
2025-01-21 11:54 ` [PATCH v2 3/6] crash: let arch decide crash memory export to iomem_resource Sourabh Jain
2025-01-23 10:26 ` Hari Bathini
2025-01-23 11:50 ` Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 4/6] powerpc/kdump: preserve user-specified memory limit Sourabh Jain
2025-01-23 10:30 ` Hari Bathini
2025-01-23 11:22 ` Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 5/6] powerpc/crash: use generic crashkernel reservation Sourabh Jain
2025-01-23 10:45 ` Hari Bathini
2025-01-23 11:53 ` Sourabh Jain
2025-01-21 11:54 ` [PATCH v2 6/6] crash: option to let arch decide mem range is usable Sourabh Jain
2025-01-24 9:52 ` Hari Bathini
2025-01-24 10:28 ` Sourabh Jain
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=bb1f886a-137c-4262-a0c5-417d7063b563@linux.ibm.com \
--to=hbathini@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=sourabhjain@linux.ibm.com \
/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).