MIPS: Fix elfcore.c build warning
Subsystems (2)
PATCH 1/1 MIPS: Fix elfcore.c build warning
kernel/elfcore.c includes elf.h which includes arch specific elf.h. In MIPS elf.h, 'struct pt_regs' is declared inside the parameter list of elf_dump_regs function. This cause kernel build warning.
So, move the declaration out of the function parameter list to remove build warning.
--- arch/mips/include/asm/elf.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/mips/include/asm/elf.h +2 -1
@@ -311,8 +311,9 @@ do { \#endif /* CONFIG_64BIT */ struct task_struct ; +struct pt_regs ; -extern void elf_dump_regs (elf_greg_t *,struct pt_regs *regs); +extern void elf_dump_regs (elf_greg_t *,struct pt_regs *);extern int dump_task_regs (struct task_struct *,elf_gregset_t *);extern int dump_task_fpu (struct task_struct *,elf_fpregset_t *);
Signature · 1 line
1.6.3.3
Quoted 6 lines · Yang Shi
kernel/elfcore.cincludeself.hwhich includes arch specificelf.h. In MIPSelf.h, 'structpt_regs' is declared inside the parameter list ofelf_dump_regsfunction. This cause kernel build warning.So, move the declaration out of the function parameter list to remove build warning.
What fixes the warning is the forward declaration of struct pt_regs not removing the function parameter name. So I've added a patch which does just that.
Thanks!
Ralf