[PATCH] arm64/include/asm: Fixed a warning about 'struct pt_regs'

Chunyan Zhang chunyan.zhang at spreadtrum.com
Wed Dec 3 22:29:35 PST 2014

If I include asm/irq.h on the top of my code, and set ARCH=arm64,
I'll get a compile warning, details are below:
warning: ‘struct pt_regs’
declared inside parameter list [enabled by default]

This patch is suggested by Arnd, see:

Signed-off-by: Chunyan Zhang <chunyan.zhang at spreadtrum.com>
 arch/arm64/include/asm/irq.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/irq.h b/arch/arm64/include/asm/irq.h
index e1f7ecd..acedc7e 100644
--- a/arch/arm64/include/asm/irq.h
+++ b/arch/arm64/include/asm/irq.h
@@ -3,6 +3,8 @@
 #include <asm-generic/irq.h>
+struct pt_regs;
 extern void (*handle_arch_irq)(struct pt_regs *);
 extern void migrate_irqs(void);
 extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));

More information about the linux-arm-kernel mailing list