All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: unisys: visorbus: Declared char * array as static const
@ 2017-09-09  7:00 Harsha Sharma
  2017-09-09  7:14 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Harsha Sharma @ 2017-09-09  7:00 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, outreachy-kernel, Harsha Sharma

State explicitly that individual entries in array will not change.

Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 6d4498f..6f2a010 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1162,7 +1162,7 @@ static ssize_t deviceenabled_store(struct device *dev,
 	struct controlvm_message_packet *cmd = &req->msg.cmd;
 	char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40],
 	    env_func[40];
-	char *envp[] = {
+	static const char * const envp[] = {
 		env_cmd, env_id, env_state, env_bus, env_dev, env_func, NULL
 	};
 
@@ -1263,7 +1263,7 @@ static ssize_t deviceenabled_store(struct device *dev,
 chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
 {
 	char env_selftest[20];
-	char *envp[] = { env_selftest, NULL };
+	static const char * const envp[] = { env_selftest, NULL };
 	int res;
 
 	sprintf(env_selftest, "SPARSP_SELFTEST=%d", 1);
-- 
1.9.1



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

end of thread, other threads:[~2017-09-12  0:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-09  7:00 [PATCH] staging: unisys: visorbus: Declared char * array as static const Harsha Sharma
2017-09-09  7:14 ` Greg KH
2017-09-09  7:36   ` Harsha Sharma
2017-09-09  8:36   ` [Outreachy kernel] " Julia Lawall
2017-09-11  9:30 ` kbuild test robot
2017-09-11  9:34   ` [Outreachy kernel] " Julia Lawall
2017-09-12  0:29 ` kbuild test robot

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.