summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-07-18 12:39:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-07-18 12:39:40 -0700
commitdb2451e78d5df51b8f926e31e343e74e6aafba9d (patch)
tree5670eb32969c3b9a4e2dd0d3c3dcf7eac1043762 /lib
parent91bd008d4e2b4962ecb9a10e40c2fb666b0aeb92 (diff)
parent0d9c0a67b14401344183cc0f8239f8d1851637fd (diff)
Merge tag 'bootconfig-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig update from Masami Hiramatsu: - Remove duplicate included header file linux/bootconfig.h from lib/bootconfig.c. This is a cleanup, no behavior change. * tag 'bootconfig-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: bootconfig: Remove duplicate included header file linux/bootconfig.h
Diffstat (limited to 'lib')
-rw-r--r--lib/bootconfig.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index 97f8911ea339..81f29c29f47b 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -4,8 +4,16 @@
* Masami Hiramatsu <mhiramat@kernel.org>
*/
-#ifdef __KERNEL__
+/*
+ * NOTE: This is only for tools/bootconfig, because tools/bootconfig will
+ * run the parser sanity test.
+ * This does NOT mean lib/bootconfig.c is available in the user space.
+ * However, if you change this file, please make sure the tools/bootconfig
+ * has no issue on building and running.
+ */
#include <linux/bootconfig.h>
+
+#ifdef __KERNEL__
#include <linux/bug.h>
#include <linux/ctype.h>
#include <linux/errno.h>
@@ -24,16 +32,6 @@ const char * __init xbc_get_embedded_bootconfig(size_t *size)
return (*size) ? embedded_bootconfig_data : NULL;
}
#endif
-
-#else /* !__KERNEL__ */
-/*
- * NOTE: This is only for tools/bootconfig, because tools/bootconfig will
- * run the parser sanity test.
- * This does NOT mean lib/bootconfig.c is available in the user space.
- * However, if you change this file, please make sure the tools/bootconfig
- * has no issue on building and running.
- */
-#include <linux/bootconfig.h>
#endif
/*