linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB/hfi1: constify vm_operations_struct
@ 2017-08-28  4:29 Arvind Yadav
  2017-08-28 23:17 ` Doug Ledford
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-28  4:29 UTC (permalink / raw)
  To: mike.marciniszyn, dennis.dalessandro, dledford, sean.hefty,
	hal.rosenstock
  Cc: linux-kernel, linux-rdma

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>
---
 drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c
index 3158128..46db68f 100644
--- a/drivers/infiniband/hw/hfi1/file_ops.c
+++ b/drivers/infiniband/hw/hfi1/file_ops.c
@@ -116,7 +116,7 @@ static long hfi1_file_ioctl(struct file *fp, unsigned int cmd,
 	.llseek = noop_llseek,
 };
 
-static struct vm_operations_struct vm_ops = {
+static const struct vm_operations_struct vm_ops = {
 	.fault = vma_fault,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-28 23:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28  4:29 [PATCH] IB/hfi1: constify vm_operations_struct Arvind Yadav
2017-08-28 23:17 ` Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).