public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] Staging: greybus: audio manager module: make char array const
@ 2022-04-20  5:37 Ian Cowan
  2022-04-20  6:24 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Cowan @ 2022-04-20  5:37 UTC (permalink / raw)
  To: vaibhav.sr; +Cc: mgreer, johan, elder, gregkh, greybus-dev, linux-staging, ian

Make the envp char array a const in the send_add_uevent function since
the value will never change. It will remain an array of the pointers to
the various char arrays.

There does exist a warning when running the checkpatch script to
make this a static variable, but there does not appear to be any advantage
to make this change.

Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
---
 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 0a0f0a394c84..c9d223b0e541 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[] = {
+	const char *envp[] = {
 		name_string,
 		vid_string,
 		pid_string,
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-20  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-20  5:37 [PATCH] Staging: greybus: audio manager module: make char array const Ian Cowan
2022-04-20  6:24 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox