From: aybuke ozdemir <aybuke.147@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: aybuke ozdemir <aybuke.147@gmail.com>
Subject: [PATCH v2] Staging: unisys: Change char * array type as static const
Date: Wed, 25 Feb 2015 00:39:42 +0200 [thread overview]
Message-ID: <1424817582-9438-1-git-send-email-aybuke.147@gmail.com> (raw)
This patch fixes "char * array declaration might be better as static
const" checkpatch.pl warning in visorchipset_main.c
After this exchange that can be accessed pointer, without object
derived from the instance but just just read operation can be done in
pointer.
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
---
Changes since v1:
* Used "static const char *const" instead of "static char const"
---
drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index f606ee9..7e97b8e 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -1009,7 +1009,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
struct visorchipset_device_info *pDevInfo =
finddevice(&DevInfoList, busNo, devNo);
- char *envp[] = {
+ static const char *const envp[] = {
"SPARSP_DIAGPOOL_PAUSED_STATE = 1",
NULL
};
@@ -1481,7 +1481,7 @@ 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,
@@ -1637,7 +1637,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
};
--
1.9.1
next reply other threads:[~2015-02-24 22:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 22:39 aybuke ozdemir [this message]
2015-02-26 23:18 ` [Outreachy kernel] [PATCH v2] Staging: unisys: Change char * array type as static const Greg KH
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=1424817582-9438-1-git-send-email-aybuke.147@gmail.com \
--to=aybuke.147@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.