From: Mike Rapoport <rppt@kernel.org>
To: Sameeksha Sankpal <sameekshasankpal@gmail.com>
Cc: akpm@linux-foundation.org, tglx@linutronix.de,
chenhuacai@kernel.org, mhiramat@kernel.org, mingo@kernel.org,
francesco@valla.it, link@vivo.com, brauner@kernel.org,
lillian@star-ark.net, guoweikang.kernel@gmail.com,
alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] init: mark envp_init as static
Date: Sun, 30 Nov 2025 11:38:16 +0200 [thread overview]
Message-ID: <aSwQiCHQw-UDSpum@kernel.org> (raw)
In-Reply-To: <20251128191650.18821-1-sameekshasankpal@gmail.com>
On Sat, Nov 29, 2025 at 12:46:50AM +0530, Sameeksha Sankpal wrote:
> Sparse reports a warning that 'envp_init' has no prior
> declaration:
>
> warning: symbol 'envp_init' was not declared. Should it be static?
>
> The variable is only used within init/main.c and does not
> need external linkage. Mark it as static to limit its scope
> and fix the sparse warning.
It's used in do_mounts_initrd::handle_initrd()
>
> Signed-off-by: Sameeksha Sankpal <sameekshasankpal@gmail.com>
> ---
> init/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/init/main.c b/init/main.c
> index 07a3116811c5..792ab00e62e6 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -191,7 +191,7 @@ static int __init set_reset_devices(char *str)
> __setup("reset_devices", set_reset_devices);
>
> static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
> -const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
> +static const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
> static const char *panic_later, *panic_param;
>
> static bool __init obsolete_checksetup(char *line)
> --
> 2.43.0
>
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2025-11-30 9:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 19:16 [PATCH] init: mark envp_init as static Sameeksha Sankpal
2025-11-30 9:38 ` Mike Rapoport [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=aSwQiCHQw-UDSpum@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=brauner@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=francesco@valla.it \
--cc=guoweikang.kernel@gmail.com \
--cc=lillian@star-ark.net \
--cc=link@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=sameekshasankpal@gmail.com \
--cc=tglx@linutronix.de \
/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