public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Ian Cowan <ian@linux.cowan.aero>
To: vaibhav.sr@gmail.com
Cc: mgreer@animalcreek.com, johan@kernel.org, elder@kernel.org,
	gregkh@linuxfoundation.org, greybus-dev@lists.linaro.org,
	linux-staging@lists.linux.dev, ian@linux.cowan.aero
Subject: [PATCH] Staging: greybus: audio manager module: make char array const
Date: Wed, 20 Apr 2022 01:37:55 -0400	[thread overview]
Message-ID: <20220420053755.48934-1-ian@linux.cowan.aero> (raw)

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


             reply	other threads:[~2022-04-20  6:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  5:37 Ian Cowan [this message]
2022-04-20  6:24 ` [PATCH] Staging: greybus: audio manager module: make char array const Dan Carpenter

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=20220420053755.48934-1-ian@linux.cowan.aero \
    --to=ian@linux.cowan.aero \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox