[PATCH 08/10] startup: add __noreturn to start_barebox

Sascha Hauer s.hauer at pengutronix.de
Sun Jan 20 10:35:17 EST 2013


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/startup.c |    3 +--
 include/common.h |    2 +-
 pbl/misc.c       |    4 +++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/common/startup.c b/common/startup.c
index c26bc5f..ecb5691 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -90,7 +90,7 @@ fs_initcall(mount_root);
 
 int (*barebox_main)(void);
 
-void start_barebox (void)
+void __noreturn start_barebox(void)
 {
 	initcall_t *initcall;
 	int result;
@@ -162,4 +162,3 @@ void shutdown_barebox(void)
 	arch_shutdown();
 #endif
 }
-
diff --git a/include/common.h b/include/common.h
index e858d0a..2c707f7 100644
--- a/include/common.h
+++ b/include/common.h
@@ -165,7 +165,7 @@ unsigned long long strtoull_suffix(const char *str, char **endp, int base);
  */
 extern int (*barebox_main)(void);
 
-void start_barebox(void);
+void __noreturn start_barebox(void);
 void shutdown_barebox(void);
 
 /*
diff --git a/pbl/misc.c b/pbl/misc.c
index a2cb44d..9065bf0 100644
--- a/pbl/misc.c
+++ b/pbl/misc.c
@@ -14,6 +14,8 @@ void __noreturn panic(const char *fmt, ...)
 	while(1);
 }
 
-void start_barebox(void)
+void __noreturn start_barebox(void)
 {
+	/* Should never be here in the pbl */
+	hang();
 }
-- 
1.7.10.4




More information about the barebox mailing list