diff options
author | Cihangir Akturk <cakturk@gmail.com> | 2015-07-22 15:59:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-07-22 20:49:39 -0700 |
commit | 83aa2ac65a36e77f5651ef8946003b856cab49bc (patch) | |
tree | e05288a29704d725c2ddd250d47b9b27f17b17cf /drivers | |
parent | 3377bad9c7ea427c002173ffcee6fc6a14833739 (diff) |
staging: lustre: obdclass: Make structure declerations static const
obd_device_list_sops and obd_device_list_fops are not referenced
outside of linux-module.c, and in the general use case
struct file_operations and struct seq_operations should be a const
object, so make them static and const.
This patch fixes the following sparse warnings:
WARNING: struct seq_operations should normally be const
WARNING: struct file_operations should normally be const
Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index b618c0bd7e09..6218ef34ee80 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -385,7 +385,7 @@ static int obd_device_list_seq_show(struct seq_file *p, void *v) return 0; } -struct seq_operations obd_device_list_sops = { +static const struct seq_operations obd_device_list_sops = { .start = obd_device_list_seq_start, .stop = obd_device_list_seq_stop, .next = obd_device_list_seq_next, @@ -406,7 +406,7 @@ static int obd_device_list_open(struct inode *inode, struct file *file) return 0; } -struct file_operations obd_device_list_fops = { +static const struct file_operations obd_device_list_fops = { .owner = THIS_MODULE, .open = obd_device_list_open, .read = seq_read, |