All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shivani Bhardwaj <shivanib134@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH] Staging: unisys: visorbus: visorchipset: Converted arrays to static const
Date: Wed, 30 Sep 2015 04:54:13 +0530	[thread overview]
Message-ID: <20150929232413.GA16457@ubuntu> (raw)

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



             reply	other threads:[~2015-09-29 23:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 23:24 Shivani Bhardwaj [this message]
2015-09-30  1:59 ` [Outreachy kernel] [PATCH] Staging: unisys: visorbus: visorchipset: Converted arrays to static const 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

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=20150929232413.GA16457@ubuntu \
    --to=shivanib134@gmail.com \
    --cc=outreachy-kernel@googlegroups.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 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.