Whamcloud - gitweb
LU-6142 lustre: change all 'struct seq_operations' to const 96/39396/2
authorMr NeilBrown <neilb@suse.de>
Thu, 16 Jul 2020 03:59:44 +0000 (13:59 +1000)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 21:42:12 +0000 (21:42 +0000)
All 'struct seq_operations' are now 'static const'.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ia0f6a2863835ec02fb7d283a099eea489f65ab3a
Reviewed-on: https://review.whamcloud.com/39396
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/gnilnd/gnilnd_proc.c
lustre/fid/lproc_fid.c
lustre/fld/lproc_fld.c
lustre/llite/vvp_dev.c
lustre/lov/lov_pool.c
lustre/obdclass/lu_ref.c
lustre/ptlrpc/lproc_ptlrpc.c
lustre/quota/lproc_quota.c

index fc806dc..ab2eda9 100644 (file)
@@ -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,
index 554e641..c1d0d8f 100644 (file)
@@ -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,
index 8c86abd..ddbc784 100644 (file)
@@ -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,
index b9daf52..bf7e089 100644 (file)
@@ -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)
index c5556c9..73e2b6a 100644 (file)
@@ -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)
index a1ac74e..95b3c27 100644 (file)
@@ -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,
index 9904bcf..88f0d26 100644 (file)
@@ -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,
index de78fd4..010a8d2 100644 (file)
@@ -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,