[PATCH] bootconfig: Remove duplicate included header file linux/bootconfig.h

From: Thorsten Blum
Date: Wed Jul 10 2024 - 20:22:30 EST


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

Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
---
lib/bootconfig.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index 97f8911ea339..297871455db5 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -4,8 +4,9 @@
* Masami Hiramatsu <mhiramat@xxxxxxxxxx>
*/

-#ifdef __KERNEL__
#include <linux/bootconfig.h>
+
+#ifdef __KERNEL__
#include <linux/bug.h>
#include <linux/ctype.h>
#include <linux/errno.h>
@@ -33,7 +34,6 @@ const char * __init xbc_get_embedded_bootconfig(size_t *size)
* However, if you change this file, please make sure the tools/bootconfig
* has no issue on building and running.
*/
-#include <linux/bootconfig.h>
#endif

/*
--
2.45.2