public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Sameeksha Sankpal <sameekshasankpal@gmail.com>
Cc: vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org,
	elder@kernel.org, greybus-dev@lists.linaro.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: audio_manager: make envp[] static const
Date: Mon, 24 Nov 2025 17:37:25 +0100	[thread overview]
Message-ID: <2025112407-gratify-demanding-c817@gregkh> (raw)
In-Reply-To: <20251122083814.49753-1-sameekshasankpal@gmail.com>

On Sat, Nov 22, 2025 at 02:08:13PM +0530, Sameeksha Sankpal wrote:
> The envp[] array contains string literals and is never modified.
> Declare it as 'static const char * const' to place it in read-only
> memory and avoid unnecessary stack usage.
> 
> This fixes a checkpatch warning:
> "char * array declaration might be better as static const"
> 
> Signed-off-by: Sameeksha Sankpal <sameekshasankpal@gmail.com>
> ---
>  drivers/staging/greybus/audio_manager_module.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c
> index 4a4dfb42f50f..1b83c05f2434 100644
> --- a/drivers/staging/greybus/audio_manager_module.c
> +++ b/drivers/staging/greybus/audio_manager_module.c
> @@ -159,7 +159,7 @@ static void send_add_uevent(struct gb_audio_manager_module *module)
>  	char ip_devices_string[64];
>  	char op_devices_string[64];
>  
> -	char *envp[] = {
> +	static const char * const envp[] = {
>  		name_string,
>  		vid_string,
>  		pid_string,
> -- 
> 2.43.0
> 
> 

Any specific reason why you did not build this patch before submitting
it?  Please always do so.

thanks,

greg k-h

      parent reply	other threads:[~2025-11-24 16:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-22  8:38 [PATCH] staging: greybus: audio_manager: make envp[] static const Sameeksha Sankpal
2025-11-24  7:56 ` kernel test robot
2025-11-24  9:11 ` kernel test robot
2025-11-24 16:37 ` Greg KH [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=2025112407-gratify-demanding-c817@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=elder@kernel.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mgreer@animalcreek.com \
    --cc=sameekshasankpal@gmail.com \
    --cc=vaibhav.sr@gmail.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