* [PATCH 2.6.34-rc1] fix warning in kernel/elfcore.c from ARM's elf.h
@ 2010-03-11 10:01 Mikael Pettersson
2010-03-11 11:01 ` Russell King - ARM Linux
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2010-03-11 10:01 UTC (permalink / raw)
To: linux-arm-kernel
2.6.34-rc1 added kernel/elfcore.c which includes <asm/elf.h>.
On ARM, this results in:
In file included from include/linux/elf.h:7,
from kernel/elfcore.c:1:
/tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: 'struct task_struct' declared inside parameter list
/tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: its scope is only this definition or declaration, which is probably not what you want
Including <linux/sched.h> seems a bit heavyweight, so this patch just
adds a tentative declaration of struct task_struct in <asm/elf.h>.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
---
diff -rupN linux-2.6.34-rc1/arch/arm/include/asm/elf.h linux-2.6.34-rc1.arm-elf-task_struct/arch/arm/include/asm/elf.h
--- linux-2.6.34-rc1/arch/arm/include/asm/elf.h 2010-02-25 14:45:00.000000000 +0100
+++ linux-2.6.34-rc1.arm-elf-task_struct/arch/arm/include/asm/elf.h 2010-03-11 10:55:39.000000000 +0100
@@ -98,6 +98,7 @@ extern int elf_check_arch(const struct e
extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int);
#define elf_read_implies_exec(ex,stk) arm_elf_read_implies_exec(&(ex), stk)
+struct task_struct;
int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
#define ELF_CORE_COPY_TASK_REGS dump_task_regs
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2.6.34-rc1] fix warning in kernel/elfcore.c from ARM's elf.h
2010-03-11 10:01 [PATCH 2.6.34-rc1] fix warning in kernel/elfcore.c from ARM's elf.h Mikael Pettersson
@ 2010-03-11 11:01 ` Russell King - ARM Linux
0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2010-03-11 11:01 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Mar 11, 2010 at 11:01:43AM +0100, Mikael Pettersson wrote:
> 2.6.34-rc1 added kernel/elfcore.c which includes <asm/elf.h>.
> On ARM, this results in:
>
> In file included from include/linux/elf.h:7,
> from kernel/elfcore.c:1:
> /tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: 'struct task_struct' declared inside parameter list
> /tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: its scope is only this definition or declaration, which is probably not what you want
>
> Including <linux/sched.h> seems a bit heavyweight, so this patch just
> adds a tentative declaration of struct task_struct in <asm/elf.h>.
Ok.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-11 11:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-11 10:01 [PATCH 2.6.34-rc1] fix warning in kernel/elfcore.c from ARM's elf.h Mikael Pettersson
2010-03-11 11:01 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).