[integrity:next-restore-kexec 18/31] include/linux/kexec.h:400:52: warning: 'struct kexec_buf' declared inside parameter list will not be visible outside of this definition or declaration

Thiago Jung Bauermann bauerman at linux.vnet.ibm.com
Tue Aug 23 08:34:59 PDT 2016


Am Dienstag, 23 August 2016, 22:17:59 schrieb kbuild test robot:
> tree:  
> https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git
> next-restore-kexec head:   62bc4b565254de4796a0835f6f67569eb4835f9f
> commit: f9f57350e53441210120931fc4e0163cf833e648 [18/31] kexec_file: Add
> buffer hand-over support for the next kernel config: i386-defconfig
> (attached as .config)
> compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
>         git checkout f9f57350e53441210120931fc4e0163cf833e648
>         # save the attached .config to linux build tree
>         make ARCH=i386
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from drivers/pci/pci-driver.c:22:0:
> >> include/linux/kexec.h:400:52: warning: 'struct kexec_buf' declared
> >> inside parameter list will not be visible outside of this definition
> >> or declaration
>     static inline int kexec_add_handover_buffer(struct kexec_buf *kbuf)

This happens when CONFIG_KEXEC=y but CONFIG_KEXEC_FILE=n, and is fixed by 
the following change, which will be in my next revision of the kexec
buffer hand-over series:

    Fix for "kexec_file: Add buffer hand-over support for the next kernel"
    
    Declare stub struct kexec_buf when CONFIG_KEXEC_FILE=n.

diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index 6ec09e85efd9..29f98f816e92 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -404,6 +404,8 @@ int kexec_add_handover_buffer(struct kexec_buf *kbuf);
 int __weak kexec_get_handover_buffer(void **addr, unsigned long *size);
 int __weak kexec_free_handover_buffer(void);
 #else
+struct kexec_buf;
+
 static inline bool kexec_can_hand_over_buffer(void)
 {
 	return false;


-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center




More information about the kexec mailing list