From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2B171B81D3 for ; Sun, 30 Nov 2025 09:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764495504; cv=none; b=IlGcqyhckHXJhXNTVrUedc/H02/pGw7BTePX2ZebQKMSn3oEOxBYhKpUjSVqFlRFMPRhDEfdagT4aUUItMs6ivU4JdcyWNO5vMS6yk9jW8YnzobCZjv4JzEFmFHJKa0ViDsjiN7pQPPHdo33zO3p3lQhqVbvS9+j93yaw5D6HBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764495504; c=relaxed/simple; bh=im+s4CL66nhnNHvA/lfO2U3evBs6Ljn03jZ7y+5XdLs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=J2x0HJbdQRam7OgUwtibl+Nhq0lO9onBEjqxa7aCLSnwUmyKCRVIdB/I+pwrDrzLY3n11qhNNIJZGX8XoMZ+wRj5GZahuPVNYuoHbwfzIlEft5LSBPQ6bbyrMeaBA5DhJjpR9nCdMHGIL6jgRI51zdIb3lr7Ze9qHVxnR6K5NG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qQWossNA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qQWossNA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCC4EC4CEF8; Sun, 30 Nov 2025 09:38:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764495503; bh=im+s4CL66nhnNHvA/lfO2U3evBs6Ljn03jZ7y+5XdLs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qQWossNAADD4KumP+wcm7RDKCnuvA4PUfGvYuUqc/LcRVPu08hwfdi91aDTklz+nd ywaTXO1hfi3u04D6NakWQrgavcLkFa+lE1AWNudFtRMesI8/YddZL6zVXLvRC1p2XD WGSWkwWkfy1SV37kGNqyEZ3laS4naIVNoe4dWbrOD3eEjjvIy6+2t8YSWyHSl8fp8s xZyyQW/ge8wUqlfPE3+/i/AvBarWgSDVcxgBkA1LXqzXjkP8ihY7E/Y+war8Z9BwUw pBVrAjXtLkuPnPBM6RkqsDqfT5he7ePA+2Sp962p8qvpW+ZyrQicPbXBdtDITFl2w9 VerwPD7R4lHLQ== Date: Sun, 30 Nov 2025 11:38:16 +0200 From: Mike Rapoport To: Sameeksha Sankpal 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 Message-ID: References: <20251128191650.18821-1-sameekshasankpal@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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.