The patch titled Subject: include/linux/kexec.h: silence compile warnings has been added to the -mm tree. Its filename is kexec_file-silence-compile-warnings.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/kexec_file-silence-compile-warnings.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/kexec_file-silence-compile-warnings.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Philipp Rudo <prudo@xxxxxxxxxxxxxxxxxx> Subject: include/linux/kexec.h: silence compile warnings Patch series "kexec_file: Clean up purgatory load", v2. Following the discussion with Dave and AKASHI, here are the common code patches extracted from my recent patch set (Add kexec_file_load support to s390) [1]. The patches were extracted to allow upstream integration together with AKASHI's common code patches before the arch code gets adjusted to the new base. The reason for this series is to prepare common code for adding kexec_file_load to s390 as well as cleaning up the mis-use of the sh_offset field during purgatory load. In detail this series contains: Patch #1&2: Minor cleanups/fixes. Patch #3-9: Clean up the purgatory load/relocation code. Especially remove the mis-use of the purgatory_info->sechdrs->sh_offset field, currently holding a pointer into either kexec_purgatory (ro) or purgatory_buf (rw) depending on the section. With these patches the section address will be calculated verbosely and sh_offset will contain the offset of the section in the stripped purgatory binary (purgatory_buf). Patch #10: Allows architectures to set the purgatory load address. This patch is important for s390 as the kernel and purgatory have to be loaded to fixed addresses. In current code this is impossible as the purgatory load is opaque to the architecture. Patch #11: Moves x86 purgatories sha implementation to common lib/ directory to allow reuse in other architectures. This patch (of 11) When building the kernel with CONFIG_KEXEC_FILE enabled gcc prints a compile warning multiple times. In file included from <path>/linux/init/initramfs.c:526:0: <path>/include/linux/kexec.h:120:9: warning: `struct kimage' declared inside parameter list [enabled by default] unsigned long cmdline_len); ^ This is because the typedefs for kexec_file_load uses struct kimage before it is declared. Fix this by simply forward declaring struct kimage. Link: http://lkml.kernel.org/r/20180321112751.22196-2-prudo@xxxxxxxxxxxxxxxxxx Signed-off-by: Philipp Rudo <prudo@xxxxxxxxxxxxxxxxxx> Cc: Eric Biederman <ebiederm@xxxxxxxxxxxx> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Cc: Thiago Jung Bauermann <bauerman@xxxxxxxxxxxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Dave Young <dyoung@xxxxxxxxxx> Cc: AKASHI Takahiro <takahiro.akashi@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/kexec.h | 2 ++ 1 file changed, 2 insertions(+) diff -puN include/linux/kexec.h~kexec_file-silence-compile-warnings include/linux/kexec.h --- a/include/linux/kexec.h~kexec_file-silence-compile-warnings +++ a/include/linux/kexec.h @@ -114,6 +114,8 @@ struct purgatory_info { unsigned long purgatory_load_addr; }; +struct kimage; + typedef int (kexec_probe_t)(const char *kernel_buf, unsigned long kernel_size); typedef void *(kexec_load_t)(struct kimage *image, char *kernel_buf, unsigned long kernel_len, char *initrd, _ Patches currently in -mm which might be from prudo@xxxxxxxxxxxxxxxxxx are kexec_file-silence-compile-warnings.patch kexec_file-remove-checks-in-kexec_purgatory_load.patch kexec_file-make-purgatory_info-ehdr-const.patch kexec_file-search-symbols-in-read-only-kexec_purgatory.patch kexec_file-use-read-only-sections-in-arch_kexec_apply_relocations.patch kexec_file-split-up-__kexec_load_puragory.patch kexec_file-remove-unneeded-for-loop-in-kexec_purgatory_setup_sechdrs.patch kexec_file-remove-unneeded-variables-in-kexec_purgatory_setup_sechdrs.patch kexec_file-remove-mis-use-of-sh_offset-field-during-purgatory-load.patch kexec_file-allow-archs-to-set-purgatory-load-address.patch kexec_file-move-purgatories-sha256-to-common-code.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html