DORMANTno replies

[PATCH] ARM: bug.h: fix sparse error: symbol '__bug' redeclared

From: H Hartley Sweeten <hidden>
Date: 2011-06-10 18:21:06
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

The symbol '__bug' is declared in arch/arm/include/asm/bug.h as:

extern void __bug(const char *file, int line) __attribute__((noreturn));

But is defined in arch/arm/kernel/traps.c as:

void __attribute__((noreturn)) __bug(const char *file, int line)

The different position of the __attribute_((noreturn)) causes a sparse error.

Change the declaration to match the definition to quiet the error.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Russell King <redacted> 

---
diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h
index 4d88425..0e56435 100644
--- a/arch/arm/include/asm/bug.h
+++ b/arch/arm/include/asm/bug.h
@@ -4,7 +4,7 @@
 
 #ifdef CONFIG_BUG
 #ifdef CONFIG_DEBUG_BUGVERBOSE
-extern void __bug(const char *file, int line) __attribute__((noreturn));
+extern void __attribute__((noreturn)) __bug(const char *file, int line);
 
 /* give file/line information */
 #define BUG()		__bug(__FILE__, __LINE__)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help