From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Thorsten Blum <thorsten.blum@toblux.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] bootconfig: Remove duplicate included header file linux/bootconfig.h
Date: Thu, 11 Jul 2024 10:08:21 +0900 [thread overview]
Message-ID: <20240711100821.a1ba1449c3be80d30ea6a697@kernel.org> (raw)
In-Reply-To: <20240711002152.800028-2-thorsten.blum@toblux.com>
On Thu, 11 Jul 2024 02:21:53 +0200
Thorsten Blum <thorsten.blum@toblux.com> wrote:
> 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
>
OK, but this leaves only a comment in !__KERNEL__ part.
That comment should be moved and updated too. Please move this on the top of
this file and remove `!__KERNEL__` part.
/*
* NOTE: This file is also used by tools/bootconfig, because tools/bootconfig
* will run the parser for sanity test.
* This does NOT mean lib/bootconfig.c is always available in the user space.
* However, if you change this file, please make sure the tools/bootconfig
* has no issue on building and running.
*/
Thank you,
> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
> ---
> 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@kernel.org>
> */
>
> -#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
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2024-07-11 1:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 0:21 [PATCH] bootconfig: Remove duplicate included header file linux/bootconfig.h Thorsten Blum
2024-07-11 1:08 ` Masami Hiramatsu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240711100821.a1ba1449c3be80d30ea6a697@kernel.org \
--to=mhiramat@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=thorsten.blum@toblux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).