From: Arvind Yadav Date: Mon, 28 Aug 2017 04:29:28 +0000 (+0530) Subject: IB/hfi1: constify vm_operations_struct X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=733da3bcb3a1293fab1e7703982540dde847d716;p=openwrt%2Fstaging%2Fblogic.git IB/hfi1: constify vm_operations_struct 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 Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c index e0fd8fc0a7ab..d893582e4450 100644 --- a/drivers/infiniband/hw/hfi1/file_ops.c +++ b/drivers/infiniband/hw/hfi1/file_ops.c @@ -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, };