]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crash: remove an unused argument from reserve_crashkernel_generic()
authorSourabh Jain <sourabhjain@linux.ibm.com>
Fri, 31 Jan 2025 11:38:25 +0000 (17:08 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 05:30:47 +0000 (22:30 -0700)
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.

Link: https://lkml.kernel.org/r/20250131113830.925179-3-sourabhjain@linux.ibm.com
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Acked-by: Hari Bathini <hbathini@linux.ibm.com>
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/arm64/mm/init.c
arch/loongarch/kernel/setup.c
arch/riscv/mm/init.c
arch/x86/kernel/setup.c
include/linux/crash_reserve.h
kernel/crash_reserve.c

index ccdef53872a0bf72f153ff2c9121fe393cd1b24a..2e496209af80d02866c33d654832628506c8f9d3 100644 (file)
@@ -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)
index 90cb3ca96f085b550eb3b2c78c6d3e4df25de1c2..b99fbb388fe03ca09fb81b2f7ec97476eaa5d7d9 100644 (file)
@@ -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)
index 15b2eda4c364b39261f94c371d791a24fb929aeb..3ec9bfaa088ad8d48c1b22687800621d811f65be 100644 (file)
@@ -1396,21 +1396,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)
index cebee310e2009efa7cbcb64f6f841995940166d7..b8ca14d29b4411afcca0e76d64c23a94e04c240d 100644 (file)
@@ -472,14 +472,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)
@@ -490,8 +489,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[] = {
index 5a9df944fb806a30c092999568c41e16ca893643..1fe7e7d1b214b808034f85c9792bbd94077f77f7 100644 (file)
@@ -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,
index a620fb4b211631f25b7a3f7b285c3a049581c626..aff7c0fdbefa8c1d6c1d1f346c455cb2b6f566db 100644 (file)
@@ -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;