From 57d6ea65e2056ada925d848942b1bc90fb98cf16 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Tue, 30 May 2023 22:19:28 -0700 Subject: [PATCH] LU-6142 lustre: change all 'struct seq_operations' to const All 'struct seq_operations' are now 'static const'. Lustre-change: https://review.whamcloud.com/39396 Lustre-commit: c5b90540731f13c37e6ad62c194ebef6725608a7 Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: Ia0f6a2863835ec02fb7d283a099eea489f65ab3a Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51172 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lnet/klnds/gnilnd/gnilnd_proc.c | 8 ++++---- lustre/fid/lproc_fid.c | 2 +- lustre/fld/lproc_fld.c | 2 +- lustre/llite/vvp_dev.c | 10 +++++----- lustre/lov/lov_pool.c | 10 +++++----- lustre/obdclass/lu_ref.c | 2 +- lustre/ptlrpc/lproc_ptlrpc.c | 2 +- lustre/quota/lproc_quota.c | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lnet/klnds/gnilnd/gnilnd_proc.c b/lnet/klnds/gnilnd/gnilnd_proc.c index 25ea340..a91539f 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 228dfe4..11cf112 100644 --- a/lustre/llite/vvp_dev.c +++ b/lustre/llite/vvp_dev.c @@ -546,11 +546,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 73ca5af..ff015db 100644 --- a/lustre/lov/lov_pool.c +++ b/lustre/lov/lov_pool.c @@ -205,11 +205,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 b3ee956..784385e 100644 --- a/lustre/ptlrpc/lproc_ptlrpc.c +++ b/lustre/ptlrpc/lproc_ptlrpc.c @@ -1081,7 +1081,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 2d634b7..37c90f5 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, -- 1.8.3.1