IB/hfi1: constify vm_operations_struct
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 28 Aug 2017 04:29:28 +0000 (09:59 +0530)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:25 +0000 (19:12 -0400)
vm_operations_struct are not supposed to change at runtime.
vm_area_struct structure working with const vm_operations_struct.
So mark the non-const vm_operations_struct structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/file_ops.c

index e0fd8fc0a7ab51e262784dd3b331a535d8ecf5f8..d893582e4450bc8554c1ccc47a42322d9964027a 100644 (file)
@@ -120,7 +120,7 @@ static const struct file_operations hfi1_file_ops = {
        .llseek = noop_llseek,
 };
 
-static struct vm_operations_struct vm_ops = {
+static const struct vm_operations_struct vm_ops = {
        .fault = vma_fault,
 };