]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: constify lmv_proc_target_fops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 28 Aug 2016 21:16:07 +0000 (23:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 15:29:21 +0000 (17:29 +0200)
lmv_proc_target_fops, of type struct file_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/lmv/lmv_internal.h
drivers/staging/lustre/lustre/lmv/lproc_lmv.c

index 3ce17da89c6e38b0a3830fcf60ab700e0cfcd8f4..c4961d9950f5b33f67f6f02efc0fbb18fd7cfb53 100644 (file)
@@ -164,6 +164,6 @@ struct lmv_tgt_desc
 /* lproc_lmv.c */
 void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars);
 
-extern struct file_operations lmv_proc_target_fops;
+extern const struct file_operations lmv_proc_target_fops;
 
 #endif
index c29c361eb0cc3da702f26987bcc138d5ad0c8ea2..d2316c0a96514904c0f09ac0afc265b9ec523707 100644 (file)
@@ -202,7 +202,7 @@ static struct lprocfs_vars lprocfs_lmv_obd_vars[] = {
        { NULL }
 };
 
-struct file_operations lmv_proc_target_fops = {
+const struct file_operations lmv_proc_target_fops = {
        .owner          = THIS_MODULE,
        .open            = lmv_target_seq_open,
        .read            = seq_read,