Commit 0d9c0a67 authored by Thorsten Blum's avatar Thorsten Blum Committed by Masami Hiramatsu (Google)

bootconfig: Remove duplicate included header file linux/bootconfig.h

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/20240711084315.1507-1-thorsten.blum@toblux.com/Signed-off-by: default avatarThorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
parent 256abd8e
...@@ -4,8 +4,16 @@ ...@@ -4,8 +4,16 @@
* Masami Hiramatsu <mhiramat@kernel.org> * 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> #include <linux/bootconfig.h>
#ifdef __KERNEL__
#include <linux/bug.h> #include <linux/bug.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -24,16 +32,6 @@ const char * __init xbc_get_embedded_bootconfig(size_t *size) ...@@ -24,16 +32,6 @@ const char * __init xbc_get_embedded_bootconfig(size_t *size)
return (*size) ? embedded_bootconfig_data : NULL; return (*size) ? embedded_bootconfig_data : NULL;
} }
#endif #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 #endif
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment