linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: greybus: audio_manager_module: make envp array static const
@ 2025-11-14  1:40 Chang Junzheng
  2025-11-15 13:16 ` Greg Kroah-Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chang Junzheng @ 2025-11-14  1:40 UTC (permalink / raw)
  To: outreachy
  Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, greybus-dev, linux-staging, linux-kernel,
	guagua210311, Chang Junzheng

From: Chang Junzheng <guagua210311@outlook.com>

Fix checkpatch.pl warning by changing envp array declaration to
static const char * const. This improves code safety and follows
kernel coding style recommendations.

Signed-off-by: Chang Junzheng <guagua210311@qq.com>
---
Changes in v2:
- Restored original indentation of array elements
- Only changed the array declaration as originally intended

 drivers/staging/greybus/audio_manager_module.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c
index 4a4dfb42f50f..78013d59fc93 100644
--- a/drivers/staging/greybus/audio_manager_module.c
+++ b/drivers/staging/greybus/audio_manager_module.c
@@ -159,14 +159,14 @@ static void send_add_uevent(struct gb_audio_manager_module *module)
 	char ip_devices_string[64];
 	char op_devices_string[64];
 
-	char *envp[] = {
-		name_string,
-		vid_string,
-		pid_string,
-		intf_id_string,
-		ip_devices_string,
-		op_devices_string,
-		NULL
+	static const char * const envp[] = {
+	name_string,
+	vid_string,
+	pid_string,
+	intf_id_string,
+	ip_devices_string,
+	op_devices_string,
+	NULL
 	};
 
 	snprintf(name_string, 128, "NAME=%s", module->desc.name);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH v2] staging: greybus: audio_manager_module: make envp array static const
@ 2025-11-13 14:12 Chang Junzheng
  2025-11-13 17:44 ` Greg Kroah-Hartman
  2025-11-14  1:41 ` kernel test robot
  0 siblings, 2 replies; 7+ messages in thread
From: Chang Junzheng @ 2025-11-13 14:12 UTC (permalink / raw)
  To: outreachy
  Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman, greybus-dev, linux-staging, linux-kernel,
	guagua210311, Chang Junzheng

From: Chang Junzheng <guagua210311@outlook.com>

Fix checkpatch.pl warning by changing envp array declaration to
static const char * const. This improves code safety and follows
kernel coding style recommendations.

Signed-off-by: Chang Junzheng <guagua210311@qq.com>
Changes in v2:
- Restored original indentation of array elements
- Only changed the array declaration as originally intended
---
 drivers/staging/greybus/audio_manager_module.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c
index 4a4dfb42f50f..78013d59fc93 100644
--- a/drivers/staging/greybus/audio_manager_module.c
+++ b/drivers/staging/greybus/audio_manager_module.c
@@ -159,14 +159,14 @@ static void send_add_uevent(struct gb_audio_manager_module *module)
 	char ip_devices_string[64];
 	char op_devices_string[64];
 
-	char *envp[] = {
-		name_string,
-		vid_string,
-		pid_string,
-		intf_id_string,
-		ip_devices_string,
-		op_devices_string,
-		NULL
+	static const char * const envp[] = {
+	name_string,
+	vid_string,
+	pid_string,
+	intf_id_string,
+	ip_devices_string,
+	op_devices_string,
+	NULL
 	};
 
 	snprintf(name_string, 128, "NAME=%s", module->desc.name);
-- 
2.43.0


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

end of thread, other threads:[~2025-11-19  4:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14  1:40 [PATCH v2] staging: greybus: audio_manager_module: make envp array static const Chang Junzheng
2025-11-15 13:16 ` Greg Kroah-Hartman
2025-11-15 13:17 ` Greg Kroah-Hartman
2025-11-19  4:07 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-11-13 14:12 Chang Junzheng
2025-11-13 17:44 ` Greg Kroah-Hartman
2025-11-14  1:41 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).