Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a613fa16 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: constify the rpc_program

parent 080b794c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -598,7 +598,7 @@ static struct rpc_procinfo nlm4_procedures[] = {
	PROC(GRANTED_RES,	res,		norep),
};

struct rpc_version	nlm_version4 = {
const struct rpc_version nlm_version4 = {
	.number		= 4,
	.nrprocs	= ARRAY_SIZE(nlm4_procedures),
	.procs		= nlm4_procedures,
+4 −4
Original line number Diff line number Diff line
@@ -596,19 +596,19 @@ static struct rpc_procinfo nlm_procedures[] = {
	PROC(GRANTED_RES,	res,		norep),
};

static struct rpc_version	nlm_version1 = {
static const struct rpc_version	nlm_version1 = {
		.number		= 1,
		.nrprocs	= ARRAY_SIZE(nlm_procedures),
		.procs		= nlm_procedures,
};

static struct rpc_version	nlm_version3 = {
static const struct rpc_version	nlm_version3 = {
		.number		= 3,
		.nrprocs	= ARRAY_SIZE(nlm_procedures),
		.procs		= nlm_procedures,
};

static struct rpc_version	*nlm_versions[] = {
static const struct rpc_version	*nlm_versions[] = {
	[1] = &nlm_version1,
	[3] = &nlm_version3,
#ifdef CONFIG_LOCKD_V4
@@ -618,7 +618,7 @@ static struct rpc_version *nlm_versions[] = {

static struct rpc_stat		nlm_rpc_stats;

struct rpc_program		nlm_program = {
const struct rpc_program	nlm_program = {
		.name		= "lockd",
		.number		= NLM_PROGRAM,
		.nrvers		= ARRAY_SIZE(nlm_versions),
+4 −4
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ struct nsm_res {
	u32			state;
};

static struct rpc_program	nsm_program;
static const struct rpc_program	nsm_program;
static				LIST_HEAD(nsm_handles);
static				DEFINE_SPINLOCK(nsm_lock);

@@ -534,19 +534,19 @@ static struct rpc_procinfo nsm_procedures[] = {
	},
};

static struct rpc_version	nsm_version1 = {
static const struct rpc_version nsm_version1 = {
		.number		= 1,
		.nrprocs	= ARRAY_SIZE(nsm_procedures),
		.procs		= nsm_procedures
};

static struct rpc_version *	nsm_version[] = {
static const struct rpc_version *nsm_version[] = {
	[1] = &nsm_version1,
};

static struct rpc_stat		nsm_stats;

static struct rpc_program	nsm_program = {
static const struct rpc_program nsm_program = {
		.name		= "statd",
		.number		= NSM_PROGRAM,
		.nrvers		= ARRAY_SIZE(nsm_version),
+4 −4
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ static bool nfs4_disable_idmapping = true;
/*
 * RPC cruft for NFS
 */
static struct rpc_version *nfs_version[5] = {
static const struct rpc_version *nfs_version[5] = {
	[2]			= &nfs_version2,
#ifdef CONFIG_NFS_V3
	[3]			= &nfs_version3,
@@ -99,7 +99,7 @@ static struct rpc_version *nfs_version[5] = {
#endif
};

struct rpc_program nfs_program = {
const struct rpc_program nfs_program = {
	.name			= "nfs",
	.number			= NFS_PROGRAM,
	.nrvers			= ARRAY_SIZE(nfs_version),
@@ -115,11 +115,11 @@ struct rpc_stat nfs_rpcstat = {

#ifdef CONFIG_NFS_V3_ACL
static struct rpc_stat		nfsacl_rpcstat = { &nfsacl_program };
static struct rpc_version *	nfsacl_version[] = {
static const struct rpc_version *nfsacl_version[] = {
	[3]			= &nfsacl_version3,
};

struct rpc_program		nfsacl_program = {
const struct rpc_program nfsacl_program = {
	.name			= "nfsacl",
	.number			= NFS_ACL_PROGRAM,
	.nrvers			= ARRAY_SIZE(nfsacl_version),
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ extern int nfs_mount(struct nfs_mount_request *info);
extern void nfs_umount(const struct nfs_mount_request *info);

/* client.c */
extern struct rpc_program nfs_program;
extern const struct rpc_program nfs_program;

extern void nfs_cleanup_cb_ident_idr(void);
extern void nfs_put_client(struct nfs_client *);
Loading