From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Jisheng Zhang Subject: [RFC PATCH 0/5] kexec: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef Date: Fri, 3 Dec 2021 13:11:52 +0800 Message-Id: <20211203051157.2160-1-jszhang@kernel.org> 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: Russell King , Catalin Marinas , Paul Walmsley , Will Deacon , Palmer Dabbelt , Albert Ou , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, hpa@zytor.com, Eric Biederman , Alexandre Ghiti Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kexec@lists.infradead.org Replace the conditional compilation using "#ifdef CONFIG_KEXEC_CORE" by a check for "IS_ENABLED(CONFIG_BLK_DEV_INITRD)", to simplify the code and increase compile coverage. I only modifies x86, arm, arm64 and riscv, other arch are not touched. If the idea is accepted, I will modify all architectures code. Jisheng Zhang (5): kexec: make crashk_res, crashk_low_res and crash_notes symbols always visible riscv: mm: init: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef x86/setup: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef arm64: mm: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef arm: use IS_ENABLED(CONFIG_KEXEC_CORE) instead of #ifdef arch/arm/kernel/setup.c | 7 +++---- arch/arm64/mm/init.c | 9 +++------ arch/riscv/mm/init.c | 6 ++---- arch/x86/kernel/setup.c | 10 +++------- include/linux/kexec.h | 12 ++++++------ 5 files changed, 17 insertions(+), 27 deletions(-) -- 2.34.1 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec