summaryrefslogtreecommitdiff
path: root/arch/arm/boot/compressed/misc.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2018-03-29 11:59:17 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2018-04-05 23:56:40 +0100
commit5f8d561fb019a3ebe073c019bf5f797f5b06c55e (patch)
tree435d7e57ae0ab288db53edb21aa8fdba0364ca65 /arch/arm/boot/compressed/misc.h
parent8aeaf4a0d22c6b3ab00003e3412e934852e7a112 (diff)
ARM: decompressor: fix warning introduced in fortify patch
Commit ee333554fed5 ("ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE") introduced a new warning: arch/arm/boot/compressed/misc.c: In function 'fortify_panic': arch/arm/boot/compressed/misc.c:167:1: error: 'noreturn' function does return [-Werror] The simple solution would be to make 'error' a noreturn function, but this causes a prototype mismatch as the function is prototyped in several .c files. So, move the function prototype to a new header. There are also a couple of variables that are also declared in several locations. Clean this up while we are here. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/boot/compressed/misc.h')
-rw-r--r--arch/arm/boot/compressed/misc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/misc.h b/arch/arm/boot/compressed/misc.h
new file mode 100644
index 000000000000..c958dccd1d97
--- /dev/null
+++ b/arch/arm/boot/compressed/misc.h
@@ -0,0 +1,10 @@
+#ifndef MISC_H
+#define MISC_H
+
+#include <linux/compiler.h>
+
+void error(char *x) __noreturn;
+extern unsigned long free_mem_ptr;
+extern unsigned long free_mem_end_ptr;
+
+#endif