staging/lustre: constify sops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 28 Aug 2016 21:27:06 +0000 (23:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 15:29:21 +0000 (17:29 +0200)
sops, of type struct seq_operations, is never modified, so declare it as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c

index 327cf63e2cc7c26d0c936e5c41def154920ba477..9bad57d65db45ae85be21b671d21820c2b63b488 100644 (file)
@@ -937,7 +937,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,
This page took 0.025722 seconds and 5 git commands to generate.