All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: unisys: visorbus: visorchipset: Converted arrays to static const
@ 2015-09-29 23:24 Shivani Bhardwaj
  2015-09-30  1:59 ` [Outreachy kernel] " Greg KH
       [not found] ` <alpine.DEB.2.02.1509300722250.1984@localhost6.localdomain6>
  0 siblings, 2 replies; 7+ messages in thread
From: Shivani Bhardwaj @ 2015-09-29 23:24 UTC (permalink / raw)
  To: outreachy-kernel

Replaced the declaration of character array from char * to
static const char * const as the array is not intended to be used
anywhere outside the function plus the values in array and the pointer
to it don't have to be changed.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmaail.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 4b76cb4..073b45b 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1411,7 +1411,7 @@ static int
 visorchipset_chipset_selftest(void)
 {
 	char env_selftest[20];
-	char *envp[] = { env_selftest, NULL };
+	static const char * const envp[] = { env_selftest, NULL };
 
 	sprintf(env_selftest, "SPARSP_SELFTEST=%d", 1);
 	kobject_uevent_env(&visorchipset_platform_device.dev.kobj, KOBJ_CHANGE,
@@ -1561,7 +1561,7 @@ parahotplug_request_kickoff(struct parahotplug_request *req)
 	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
 	};
 
-- 
2.1.0



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

end of thread, other threads:[~2015-09-30 18:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 23:24 [PATCH] Staging: unisys: visorbus: visorchipset: Converted arrays to static const Shivani Bhardwaj
2015-09-30  1:59 ` [Outreachy kernel] " Greg KH
     [not found]   ` <CAKHNQQFAUaJfbySZ_r-ZtFAz9B7ih0Vmezgz3Qv7-khTB-2WYA@mail.gmail.com>
     [not found]     ` <20150930041851.GA21970@kroah.com>
2015-09-30  4:20       ` Shivani Bhardwaj
2015-09-30  4:26         ` Shivani Bhardwaj
2015-09-30  4:42           ` Vaishali Thakkar
2015-09-30  5:17         ` Greg KH
     [not found] ` <alpine.DEB.2.02.1509300722250.1984@localhost6.localdomain6>
     [not found]   ` <CAKHNQQGYc70qjW3Cjm=JOAbR5a5E+6KsTufMSuG2xsrY-g8Tgg@mail.gmail.com>
2015-09-30 18:05     ` Shivani Bhardwaj

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.