staging: lustre: Use const static file_operations struct
authorM. Vefa Bicakci <m.v.b@runbox.com>
Sun, 28 Feb 2016 14:26:21 +0000 (09:26 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2016 03:28:29 +0000 (19:28 -0800)
This commit corrects the following sparse warning regarding a
file_operations structure being non-static and constifies the
structure in question as well.

  warning: symbol 'lprocfs_stats_seq_fops' was not declared.
    Should it be static?

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c

index 3c895be38fa9aa7d74972008b1f3304bed730f47..7c287550a85a6051b1b86dc1d4038538811c81d2 100644 (file)
@@ -1197,7 +1197,7 @@ static int lprocfs_stats_seq_open(struct inode *inode, struct file *file)
        return 0;
 }
 
-struct file_operations lprocfs_stats_seq_fops = {
+static const struct file_operations lprocfs_stats_seq_fops = {
        .owner   = THIS_MODULE,
        .open    = lprocfs_stats_seq_open,
        .read    = seq_read,