Return-path: From: Zhen Lei Subject: [PATCH v18 12/17] kdump: Reduce unused parameters of parse_crashkernel_{high|low} Date: Wed, 22 Dec 2021 21:08:15 +0800 Message-ID: <20211222130820.1754-13-thunder.leizhen@huawei.com> In-Reply-To: <20211222130820.1754-1-thunder.leizhen@huawei.com> References: <20211222130820.1754-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , linux-kernel@vger.kernel.org, Dave Young , Baoquan He , Vivek Goyal , Eric Biederman , kexec@lists.infradead.org, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org Cc: Zhen Lei , Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , John Donnelly The parameters 'system_ram' and 'crash_base' is only needed by the case of "crashkernel=X@[offset]". The argument list of parse_crashkernel_suffix() can help prove this point. Signed-off-by: Zhen Lei --- kernel/crash_core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/crash_core.c b/kernel/crash_core.c index a037076b89a9bb2..67f5065e3c3cfcc 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -288,19 +288,19 @@ int __init parse_crashkernel(char *cmdline, #ifdef CONFIG_64BIT static int __init parse_crashkernel_high(char *cmdline, - unsigned long long system_ram, - unsigned long long *crash_size, - unsigned long long *crash_base) + unsigned long long *crash_size) { - return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base, SUFFIX_HIGH); + unsigned long long base; + + return __parse_crashkernel(cmdline, 0, crash_size, &base, SUFFIX_HIGH); } static int __init parse_crashkernel_low(char *cmdline, - unsigned long long system_ram, - unsigned long long *crash_size, - unsigned long long *crash_base) + unsigned long long *crash_size) { - return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base, SUFFIX_LOW); + unsigned long long base; + + return __parse_crashkernel(cmdline, 0, crash_size, &base, SUFFIX_LOW); } static int __init reserve_crashkernel_low(unsigned long long low_size) @@ -368,14 +368,14 @@ static int __init parse_crashkernel_in_order(char *cmdline, #ifdef CONFIG_64BIT /* crashkernel=X,high */ - ret = parse_crashkernel_high(cmdline, system_ram, crash_size, crash_base); + ret = parse_crashkernel_high(cmdline, crash_size); if (ret || crash_size <= 0) return CRASHKERNEL_MEM_NONE; flag = CRASHKERNEL_MEM_HIGH; /* crashkernel=Y,low */ - ret = parse_crashkernel_low(cmdline, system_ram, low_size, crash_base); + ret = parse_crashkernel_low(cmdline, low_size); if (!ret) flag |= CRASHKERNEL_MEM_LOW; #endif -- 2.25.1 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec