[S390] smsgiucv: declare char pointers as "const"
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Mon, 8 Mar 2010 11:26:25 +0000 (12:26 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 8 Mar 2010 11:26:28 +0000 (12:26 +0100)
Declare the smsgiucv prefix char pointer as "const" and use
use const char pointers in callback functions.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/cmm.c
drivers/s390/net/smsgiucv.c
drivers/s390/net/smsgiucv.h

index 76a3637b88e0ac90338296638ac9215ae2d3272e..f16bd04e39e9566dabe8928e7cd526bdcd26010c 100644 (file)
@@ -374,7 +374,7 @@ static struct ctl_table cmm_dir_table[] = {
 #ifdef CONFIG_CMM_IUCV
 #define SMSG_PREFIX "CMM"
 static void
-cmm_smsg_target(char *from, char *msg)
+cmm_smsg_target(const char *from, char *msg)
 {
        long nr, seconds;
 
index 67f2485d2372512376c770031aac583201ad27d9..3e666b6e77b4e799cbce6ca6424f2ee87842c431 100644 (file)
@@ -31,9 +31,9 @@
 
 struct smsg_callback {
        struct list_head list;
-       char *prefix;
+       const char *prefix;
        int len;
-       void (*callback)(char *from, char *str);
+       void (*callback)(const char *from, char *str);
 };
 
 MODULE_AUTHOR
@@ -100,8 +100,8 @@ static void smsg_message_pending(struct iucv_path *path,
        kfree(buffer);
 }
 
-int smsg_register_callback(char *prefix,
-                          void (*callback)(char *from, char *str))
+int smsg_register_callback(const char *prefix,
+                          void (*callback)(const char *from, char *str))
 {
        struct smsg_callback *cb;
 
@@ -117,8 +117,9 @@ int smsg_register_callback(char *prefix,
        return 0;
 }
 
-void smsg_unregister_callback(char *prefix,
-                             void (*callback)(char *from, char *str))
+void smsg_unregister_callback(const char *prefix,
+                             void (*callback)(const char *from,
+                                              char *str))
 {
        struct smsg_callback *cb, *tmp;
 
index 67f5d4f8378d2c54f90c25ccde6fa0107bf040a8..9410b45fde03efe5df14045d6e619a9d78196220 100644 (file)
@@ -5,6 +5,8 @@
  * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
  */
 
-int  smsg_register_callback(char *, void (*)(char *, char *));
-void smsg_unregister_callback(char *, void (*)(char *, char *));
+int  smsg_register_callback(const char *,
+                           void (*)(const char *, char *));
+void smsg_unregister_callback(const char *,
+                             void (*)(const char *, char *));