[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <767e34a7ec29c417fdd5ff6e0fc76bc93d4f3c6f.1626266516.git.geert+renesas@glider.be>
Date: Wed, 14 Jul 2021 14:50:19 +0200
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Rob Herring <robh+dt@...nel.org>,
Russell King <linux@...linux.org.uk>,
Nicolas Pitre <nico@...xnic.net>,
Ard Biesheuvel <ardb@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Nick Kossifidis <mick@....forth.gr>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Frank Rowand <frowand.list@...il.com>,
Dave Young <dyoung@...hat.com>, Mike Rapoport <rppt@...nel.org>
Cc: Baoquan He <bhe@...hat.com>, Vivek Goyal <vgoyal@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-riscv@...ts.infradead.org, kexec@...ts.infradead.org,
linux-mm@...ck.org, linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH v4 09/10] arm64: kdump: Use IS_ENABLED(CONFIG_CRASH_DUMP) instead of #ifdef
Replace the conditional compilation using "#ifdef CONFIG_CRASH_DUMP" by
a check for "IS_ENABLED(CONFIG_CRASH_DUMP)", to increase compile
coverage and to simplify the code.
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
v4:
- New.
---
arch/arm64/mm/init.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index f90ba99437c0f3c9..dc2a5b73232843e4 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -124,7 +124,6 @@ static void __init reserve_crashkernel(void)
}
#endif /* CONFIG_KEXEC_CORE */
-#ifdef CONFIG_CRASH_DUMP
/*
* reserve_elfcorehdr() - reserves memory for elf core header
*
@@ -135,7 +134,7 @@ static void __init reserve_crashkernel(void)
*/
static void __init reserve_elfcorehdr(void)
{
- if (!elfcorehdr_size)
+ if (!IS_ENABLED(CONFIG_CRASH_DUMP) || !elfcorehdr_size)
return;
if (memblock_is_region_reserved(elfcorehdr_addr, elfcorehdr_size)) {
@@ -148,11 +147,6 @@ static void __init reserve_elfcorehdr(void)
pr_info("Reserving %lldKB of memory at 0x%llx for elfcorehdr\n",
elfcorehdr_size >> 10, elfcorehdr_addr);
}
-#else
-static void __init reserve_elfcorehdr(void)
-{
-}
-#endif /* CONFIG_CRASH_DUMP */
/*
* Return the maximum physical address for a zone accessible by the given bits
--
2.25.1
Powered by blists - more mailing lists