]> Git Repo - J-linux.git/commitdiff
bootconfig: Remove duplicate included header file linux/bootconfig.h
authorThorsten Blum <[email protected]>
Thu, 11 Jul 2024 08:43:16 +0000 (10:43 +0200)
committerMasami Hiramatsu (Google) <[email protected]>
Thu, 11 Jul 2024 23:55:02 +0000 (08:55 +0900)
The header file linux/bootconfig.h is included whether __KERNEL__ is
defined or not.

Include it only once before the #ifdef/#else/#endif preprocessor
directives and remove the following make includecheck warning:

  linux/bootconfig.h is included more than once

Move the comment to the top and delete the now empty #else block.

Link: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Thorsten Blum <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
lib/bootconfig.c

index 97f8911ea339e69cc23228ef7d63b4381e883b34..81f29c29f47b60c15cb88237cd6a647f4f4d4d1f 100644 (file)
@@ -4,8 +4,16 @@
  * Masami Hiramatsu <[email protected]>
  */
 
-#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
 
 /*
This page took 0.049713 seconds and 4 git commands to generate.