From: Mr NeilBrown Date: Thu, 16 Jul 2020 03:59:44 +0000 (+1000) Subject: LU-6142 lustre: change all 'struct seq_operations' to const X-Git-Tag: 2.14.51~113 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=c5b90540731f13c37e6ad62c194ebef6725608a7 LU-6142 lustre: change all 'struct seq_operations' to const All 'struct seq_operations' are now 'static const'. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: Ia0f6a2863835ec02fb7d283a099eea489f65ab3a Reviewed-on: https://review.whamcloud.com/39396 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- diff --git a/lnet/klnds/gnilnd/gnilnd_proc.c b/lnet/klnds/gnilnd/gnilnd_proc.c index fc806dc..ab2eda9 100644 --- a/lnet/klnds/gnilnd/gnilnd_proc.c +++ b/lnet/klnds/gnilnd/gnilnd_proc.c @@ -499,7 +499,7 @@ kgnilnd_mdd_seq_show(struct seq_file *s, void *iter) return 0; } -static struct seq_operations kgn_mdd_sops = { +static const struct seq_operations kgn_mdd_sops = { .start = kgnilnd_mdd_seq_start, .stop = kgnilnd_mdd_seq_stop, .next = kgnilnd_mdd_seq_next, @@ -712,7 +712,7 @@ kgnilnd_smsg_seq_show(struct seq_file *s, void *iter) return 0; } -static struct seq_operations kgn_smsg_sops = { +static const struct seq_operations kgn_smsg_sops = { .start = kgnilnd_smsg_seq_start, .stop = kgnilnd_smsg_seq_stop, .next = kgnilnd_smsg_seq_next, @@ -935,7 +935,7 @@ kgnilnd_conn_seq_show(struct seq_file *s, void *iter) return 0; } -static struct seq_operations kgn_conn_sops = { +static const struct seq_operations kgn_conn_sops = { .start = kgnilnd_conn_seq_start, .stop = kgnilnd_conn_seq_stop, .next = kgnilnd_conn_seq_next, @@ -1288,7 +1288,7 @@ kgnilnd_peer_seq_show(struct seq_file *s, void *iter) return 0; } -static struct seq_operations kgn_peer_sops = { +static const struct seq_operations kgn_peer_sops = { .start = kgnilnd_peer_seq_start, .stop = kgnilnd_peer_seq_stop, .next = kgnilnd_peer_seq_next, diff --git a/lustre/fid/lproc_fid.c b/lustre/fid/lproc_fid.c index 554e641..c1d0d8f 100644 --- a/lustre/fid/lproc_fid.c +++ b/lustre/fid/lproc_fid.c @@ -327,7 +327,7 @@ static int fldb_seq_show(struct seq_file *p, void *v) return rc; } -struct seq_operations fldb_sops = { +static const struct seq_operations fldb_sops = { .start = fldb_seq_start, .stop = fldb_seq_stop, .next = fldb_seq_next, diff --git a/lustre/fld/lproc_fld.c b/lustre/fld/lproc_fld.c index 8c86abd..ddbc784 100644 --- a/lustre/fld/lproc_fld.c +++ b/lustre/fld/lproc_fld.c @@ -262,7 +262,7 @@ static int fldb_seq_show(struct seq_file *p, void *v) return rc; } -struct seq_operations fldb_sops = { +static const struct seq_operations fldb_sops = { .start = fldb_seq_start, .stop = fldb_seq_stop, .next = fldb_seq_next, diff --git a/lustre/llite/vvp_dev.c b/lustre/llite/vvp_dev.c index b9daf524..bf7e089 100644 --- a/lustre/llite/vvp_dev.c +++ b/lustre/llite/vvp_dev.c @@ -541,11 +541,11 @@ static void vvp_pgcache_stop(struct seq_file *f, void *v) /* Nothing to do */ } -static struct seq_operations vvp_pgcache_ops = { - .start = vvp_pgcache_start, - .next = vvp_pgcache_next, - .stop = vvp_pgcache_stop, - .show = vvp_pgcache_show +static const struct seq_operations vvp_pgcache_ops = { + .start = vvp_pgcache_start, + .next = vvp_pgcache_next, + .stop = vvp_pgcache_stop, + .show = vvp_pgcache_show }; static int vvp_dump_pgcache_seq_open(struct inode *inode, struct file *filp) diff --git a/lustre/lov/lov_pool.c b/lustre/lov/lov_pool.c index c5556c9..73e2b6a 100644 --- a/lustre/lov/lov_pool.c +++ b/lustre/lov/lov_pool.c @@ -204,11 +204,11 @@ static int pool_proc_show(struct seq_file *s, void *v) return 0; } -static struct seq_operations pool_proc_ops = { - .start = pool_proc_start, - .next = pool_proc_next, - .stop = pool_proc_stop, - .show = pool_proc_show, +static const struct seq_operations pool_proc_ops = { + .start = pool_proc_start, + .next = pool_proc_next, + .stop = pool_proc_stop, + .show = pool_proc_show, }; static int pool_proc_open(struct inode *inode, struct file *file) diff --git a/lustre/obdclass/lu_ref.c b/lustre/obdclass/lu_ref.c index a1ac74e..95b3c27 100644 --- a/lustre/obdclass/lu_ref.c +++ b/lustre/obdclass/lu_ref.c @@ -360,7 +360,7 @@ static int lu_ref_seq_show(struct seq_file *seq, void *p) return 0; } -static struct seq_operations lu_ref_seq_ops = { +static const struct seq_operations lu_ref_seq_ops = { .start = lu_ref_seq_start, .stop = lu_ref_seq_stop, .next = lu_ref_seq_next, diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c index 9904bcf..88f0d26 100644 --- a/lustre/ptlrpc/lproc_ptlrpc.c +++ b/lustre/ptlrpc/lproc_ptlrpc.c @@ -1065,7 +1065,7 @@ static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter) static int ptlrpc_lprocfs_svc_req_history_open(struct inode *inode, struct file *file) { - static struct seq_operations sops = { + static const struct seq_operations sops = { .start = ptlrpc_lprocfs_svc_req_history_start, .stop = ptlrpc_lprocfs_svc_req_history_stop, .next = ptlrpc_lprocfs_svc_req_history_next, diff --git a/lustre/quota/lproc_quota.c b/lustre/quota/lproc_quota.c index de78fd4..010a8d2 100644 --- a/lustre/quota/lproc_quota.c +++ b/lustre/quota/lproc_quota.c @@ -263,7 +263,7 @@ static int lprocfs_quota_seq_show(struct seq_file *p, void *v) return 0; } -struct seq_operations lprocfs_quota_seq_sops = { +static const struct seq_operations lprocfs_quota_seq_sops = { .start = lprocfs_quota_seq_start, .stop = lprocfs_quota_seq_stop, .next = lprocfs_quota_seq_next,