Skip to contentSkip to conversation

drivers:staging:visorbus:Fix checkpatch warnings

PATCH In review Ravi Teja 4 participants 4 messages Jun 28, 2015 – Jun 29, 2015 Staging

lore
Share & tools
lore

Ravi Teja

author
#0 lore raw

PATCH 1/1 drivers:staging:visorbus:Fix checkpatch warnings

This patch fixes checkpatch warnings

---
 drivers/staging/unisys/visorbus/visorchipset.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/unisys/visorbus/visorchipset.c +5 -5
index bb8087e..62f7f68 100644
@@ -1410,8 +1410,8 @@ visorchipset_chipset_ready(void)
 static int
 visorchipset_chipset_selftest(void)
 {
-    char env_selftest[20];
-    char *envp[] = { env_selftest, NULL };
+    static char env_selftest[20];
+    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,
@@ -1559,9 +1559,9 @@ static void
 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 char env_cmd[40], env_id[40], env_state[40], env_bus[40],
+            env_dev[40], env_func[40];
+    static const char * const envp[] = {
         env_cmd, env_id, env_state, env_bus, env_dev, env_func, NULL
     };
 
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 2 lines · Ravi Teja

This patch fixes checkpatch warnings

What warnings? Be specific please.

#2 lore raw
In reply to Ravi Teja
Quoted 3 lines · Ravi Teja

This patch fixes checkpatch warnings

This patch is scary for how wrong it looks. But the changelog is definitely wrong so I'm not going to try understand the patch.

regards,
dan carpenter

#3 lore raw
In reply to Ravi Teja
Quoted 4 lines · Ravi Teja

This patch fixes checkpatch warnings

David,

Is this code removed after you ripped out the parahotplug stuff? IOW, the next round of updates from Ben might obsolete this patch.

Cheers,
Don

Quoted 35 lines
---
 drivers/staging/unisys/visorbus/visorchipset.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/unisys/visorbus/visorchipset.c +5 -5
index bb8087e..62f7f68 100644
@@ -1410,8 +1410,8 @@ visorchipset_chipset_ready(void)
 static int
 visorchipset_chipset_selftest(void)
 {
-    char env_selftest[20];
-    char *envp[] = { env_selftest, NULL };
+    static char env_selftest[20];
+    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,
@@ -1559,9 +1559,9 @@ static void
 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 char env_cmd[40], env_id[40], env_state[40], env_bus[40],
+            env_dev[40], env_func[40];
+    static const char * const envp[] = {
         env_cmd, env_id, env_state, env_bus, env_dev, env_func, NULL
     };
 
Signature · 1 line
1.9.1