From: Sameeksha Sankpal <sameekshasankpal@gmail.com>
To: vaibhav.sr@gmail.com, mgreer@animalcreek.com
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org,
Sameeksha Sankpal <sameekshasankpal@gmail.com>
Subject: [PATCH] staging: greybus: audio_manager: make envp[] static const
Date: Sat, 22 Nov 2025 14:08:13 +0530 [thread overview]
Message-ID: <20251122083814.49753-1-sameekshasankpal@gmail.com> (raw)
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
next reply other threads:[~2025-11-22 8:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-22 8:38 Sameeksha Sankpal [this message]
2025-11-24 7:56 ` [PATCH] staging: greybus: audio_manager: make envp[] static const kernel test robot
2025-11-24 9:11 ` kernel test robot
2025-11-24 16:37 ` Greg KH
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=20251122083814.49753-1-sameekshasankpal@gmail.com \
--to=sameekshasankpal@gmail.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.