SUNRPC: constify rpc_program->name
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 20 Jan 2012 18:53:56 +0000 (13:53 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 1 Feb 2012 00:28:20 +0000 (19:28 -0500)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
include/linux/sunrpc/clnt.h
net/sunrpc/clnt.c

index db6970ced9bc0e367bb70915ca31c4cb53441126..4a46ffd73a042edd0636c04796ebe5ab198d870c 100644 (file)
@@ -70,12 +70,12 @@ struct rpc_clnt {
  */
 #define RPC_MAXVERSION         4
 struct rpc_program {
-       char *                  name;           /* protocol name */
+       const char *            name;           /* protocol name */
        u32                     number;         /* program number */
        unsigned int            nrvers;         /* number of versions */
        struct rpc_version **   version;        /* version array */
        struct rpc_stat *       stats;          /* statistics */
-       char *                  pipe_dir_name;  /* path to rpc_pipefs dir */
+       const char *            pipe_dir_name;  /* path to rpc_pipefs dir */
 };
 
 struct rpc_version {
index e9b22e8e16c791ec51989132491e3ecc203dba05..1b2317fa40431ed15004c0873afde6160552f61d 100644 (file)
@@ -118,7 +118,8 @@ static void rpc_clnt_remove_pipedir(struct rpc_clnt *clnt)
 }
 
 static struct dentry *rpc_setup_pipedir_sb(struct super_block *sb,
-                                   struct rpc_clnt *clnt, char *dir_name)
+                                   struct rpc_clnt *clnt,
+                                   const char *dir_name)
 {
        static uint32_t clntid;
        char name[15];
@@ -151,7 +152,7 @@ static struct dentry *rpc_setup_pipedir_sb(struct super_block *sb,
 }
 
 static int
-rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name)
+rpc_setup_pipedir(struct rpc_clnt *clnt, const char *dir_name)
 {
        struct super_block *pipefs_sb;
        struct dentry *dentry;