Skip to contentSkip to conversation

ARM: OMAP2: reboot: Include common.h to fix build error

PATCH New Axel Lin 2 participants 2 messages Jun 19, 2013 – Jun 20, 2013

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ARM: OMAP2: reboot: Include common.h to fix build error

Include common.h which will include linux/reboot.h to fix below build error.

CC arch/arm/mach-omap2/omap4-restart.o
arch/arm/mach-omap2/omap4-restart.c:21:28: warning: 'enum reboot_mode' declared inside parameter list [enabled by default] arch/arm/mach-omap2/omap4-restart.c:21:28: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] arch/arm/mach-omap2/omap4-restart.c:21:40: error: parameter 1 ('mode') has incomplete type
arch/arm/mach-omap2/omap4-restart.c:21:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]
make[1]: *** [arch/arm/mach-omap2/omap4-restart.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

---
Seems this build error is introduced by commit 7507d035f3cf40c "reboot: arm: change reboot_mode to use enum reboot_mode"

This patch is against linux-next 20130619.

 arch/arm/mach-omap2/omap4-restart.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-omap2/omap4-restart.c +1 -0
index 652adde..7306d9b 100644
@@ -9,6 +9,7 @@
 
 #include <linux/types.h>
 #include "prminst44xx.h"
+#include "common.h"
 
 /**
  * omap44xx_restart - trigger a software restart of the SoC
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 ARM: OMAP2: reboot: Include common.h to fix build error

Hi,

Quoted 22 lines · Axel Lin

Include common.h which will include linux/reboot.h to fix below build error.

CC arch/arm/mach-omap2/omap4-restart.o
arch/arm/mach-omap2/omap4-restart.c:21:28: warning: 'enum reboot_mode' declared inside parameter list [enabled by default] arch/arm/mach-omap2/omap4-restart.c:21:28: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] arch/arm/mach-omap2/omap4-restart.c:21:40: error: parameter 1 ('mode') has incomplete type
arch/arm/mach-omap2/omap4-restart.c:21:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]
make[1]: *** [arch/arm/mach-omap2/omap4-restart.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

---
Seems this build error is introduced by commit 7507d035f3cf40c "reboot: arm: change reboot_mode to use enum reboot_mode"

This patch is against linux-next 20130619.

arch/arm/mach-omap2/omap4-restart.c +0 -0
index 652adde..7306d9b 100644

arch/arm/mach-omap2/omap4-restart.c line 12

Quoted 4 lines
arch/arm/mach-omap2/omap4-restart.c +1 -0
@@ -9,6 +9,7 @@
 
 #include <linux/types.h>
 #include "prminst44xx.h"
+#include "common.h"

Arnd has posted a patch [1] that includes reboot.h directly for multiple platforms including this one.

Regards
Afzal

[1] https://lkml.org/lkml/2013/6/19/498