Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crash: align the declaration of crash_load_dm_crypt_keys with CONFIG_CRASH_DM_CRYPT

This will prevent a compilation failure when CONFIG_CRASH_DUMP is enabled
but CONFIG_CRASH_DM_CRYPT is disabled,

arch/powerpc/kexec/elf_64.c: In function 'elf64_load':
>> arch/powerpc/kexec/elf_64.c:82:23: error: implicit declaration of function 'crash_load_dm_crypt_keys' [-Werror=implicit-function-declaration]
82 | ret = crash_load_dm_crypt_keys(image);
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Link: https://lkml.kernel.org/r/20260225060347.718905-3-coxu@redhat.com
Signed-off-by: Coiby Xu <coxu@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202602120648.RgQALnnI-lkp@intel.com/
Acked-by: Baoquan He <bhe@redhat.com>
Cc: Arnaud Lefebvre <arnaud.lefebvre@clever-cloud.com>
Cc: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Cc: Dave Young <dyoung@redhat.com>
Cc: Kairui Song <ryncsn@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Pingfan Liu <kernelfans@gmail.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Sourabh Jain <sourabhjain@linux.ibm.com>
Cc: Thomas Staudt <tstaudt@de.ibm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Coiby Xu and committed by
Andrew Morton
fe74eb28 03738dd1

+7 -7
+7 -7
include/linux/crash_core.h
··· 34 34 static inline void arch_kexec_unprotect_crashkres(void) { } 35 35 #endif 36 36 37 - #ifdef CONFIG_CRASH_DM_CRYPT 38 - int crash_load_dm_crypt_keys(struct kimage *image); 39 - ssize_t dm_crypt_keys_read(char *buf, size_t count, u64 *ppos); 40 - #else 41 - static inline int crash_load_dm_crypt_keys(struct kimage *image) {return 0; } 42 - #endif 43 - 44 37 #ifndef arch_crash_handle_hotplug_event 45 38 static inline void arch_crash_handle_hotplug_event(struct kimage *image, void *arg) { } 46 39 #endif ··· 88 95 static inline void crash_save_cpu(struct pt_regs *regs, int cpu) {}; 89 96 static inline int kimage_crash_copy_vmcoreinfo(struct kimage *image) { return 0; }; 90 97 #endif /* CONFIG_CRASH_DUMP*/ 98 + 99 + #ifdef CONFIG_CRASH_DM_CRYPT 100 + int crash_load_dm_crypt_keys(struct kimage *image); 101 + ssize_t dm_crypt_keys_read(char *buf, size_t count, u64 *ppos); 102 + #else 103 + static inline int crash_load_dm_crypt_keys(struct kimage *image) {return 0; } 104 + #endif 91 105 92 106 #endif /* LINUX_CRASH_CORE_H */