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>
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,
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,