[S390] remove warnings with functions ending in BUG
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Dec 2008 12:39:17 +0000 (13:39 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 25 Dec 2008 12:39:12 +0000 (13:39 +0100)
Functions which end in a BUG() statement and skip the return statement
cause compile warnings on s390, e.g.:

mm/bootmem.c: In function 'mark_bootmem':
mm/bootmem.c:321: warning: control reaches end of non-void function

To avoid the warning add an endless loop to the BUG() macro.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/bug.h

index 384e3621e3418055feb30164c207f058cf746c58..7efd0abe88871dc494e26adc1ef5b31b7edffcb4 100644 (file)
 
 #endif /* CONFIG_DEBUG_BUGVERBOSE */
 
-#define BUG()  __EMIT_BUG(0)
+#define BUG() do {                                     \
+       __EMIT_BUG(0);                                  \
+       for (;;);                                       \
+} while (0)
 
 #define WARN_ON(x) ({                                  \
        int __ret_warn_on = !!(x);                      \