public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 3.0] fix compile warnings in plat-iop/cp6.c
@ 2011-07-22 12:43 Mikael Pettersson
  2011-07-22 13:27 ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael Pettersson @ 2011-07-22 12:43 UTC (permalink / raw)
  To: linux-arm-kernel

Building 3.0 for an n2100 (plat-iop) results in:

In file included from arch/arm/plat-iop/cp6.c:20:
/tmp/linux-3.0/arch/arm/include/asm/traps.h:12: warning: 'struct pt_regs' declared inside parameter list
/tmp/linux-3.0/arch/arm/include/asm/traps.h:12: warning: its scope is only this definition or declaration, which is probably not what you want
/tmp/linux-3.0/arch/arm/include/asm/traps.h:48: warning: 'struct pt_regs' declared inside parameter list
/tmp/linux-3.0/arch/arm/include/asm/traps.h:48: warning: 'struct task_struct' declared inside parameter list
arch/arm/plat-iop/cp6.c:45: warning: initialization from incompatible pointer type

The pt_regs and incompatible pointer type warnings are fixed by including
<asm/ptrace.h> before <asm/traps.h>.  Nothing here depends on task_struct,
so that warning can be fixed by a forward struct declaration.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
---
--- linux-3.0/arch/arm/plat-iop/cp6.c.~1~	2011-07-22 12:01:07.000000000 +0200
+++ linux-3.0/arch/arm/plat-iop/cp6.c	2011-07-22 14:26:51.000000000 +0200
@@ -17,8 +17,9 @@
  *
  */
 #include <linux/init.h>
-#include <asm/traps.h>
 #include <asm/ptrace.h>
+struct task_struct;
+#include <asm/traps.h>
 
 static int cp6_trap(struct pt_regs *regs, unsigned int instr)
 {

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-22 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 12:43 [PATCH 3.0] fix compile warnings in plat-iop/cp6.c Mikael Pettersson
2011-07-22 13:27 ` Russell King - ARM Linux
2011-07-22 14:28   ` Mikael Pettersson
2011-07-22 15:07     ` Russell King - ARM Linux
2011-07-22 16:01       ` Mikael Pettersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox