summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-09-30 17:42:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-05 08:30:39 +0200
commit4ef08098b6d21b20eea76233ede13dc0142e3fab (patch)
tree70f75910725258a2bedc275c7a71c7338ec44773 /include
parentf644f8d80a59407d44fcdd0ced7f3c956d24b849 (diff)
downloadbarebox-4ef08098b6d21b20eea76233ede13dc0142e3fab.tar.gz
barebox-4ef08098b6d21b20eea76233ede13dc0142e3fab.tar.xz
include: move panic() prototype to <printk.h>
The panic declaration in <linux/kernel.h> is out of place and unexpected as it's not a Linux kernel. printf() and printk() are defined in <printk.h>, so move it there too. Most files making use of panic(), pull it in via <common.h>, so we only need to adjust two headers for the new location. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220930154247.756577-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/firmware.h1
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/printk.h2
3 files changed, 3 insertions, 2 deletions
diff --git a/include/firmware.h b/include/firmware.h
index 2cfaeb1e6a..cfb8899322 100644
--- a/include/firmware.h
+++ b/include/firmware.h
@@ -7,6 +7,7 @@
#define FIRMWARE_H
#include <pbl.h>
+#include <printk.h>
#include <types.h>
#include <driver.h>
#include <debug_ll.h>
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 4483d33e65..44fc02df0b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -82,8 +82,6 @@
(__x < 0) ? -__x : __x; \
})
-void __noreturn panic(const char *fmt, ...);
-
extern unsigned long simple_strtoul(const char *,char **,unsigned int);
extern long simple_strtol(const char *,char **,unsigned int);
extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
diff --git a/include/printk.h b/include/printk.h
index 8de8202af9..b313b408a9 100644
--- a/include/printk.h
+++ b/include/printk.h
@@ -27,6 +27,8 @@ static inline int printf(const char *fmt, ...)
}
#endif
+void __attribute__((noreturn)) panic(const char *fmt, ...);
+
#define printk printf
#define printk_once(fmt, ...) \