* [PATCH] IB/hfi1: constify vm_operations_struct
@ 2017-08-28 4:29 ` Arvind Yadav
0 siblings, 0 replies; 3+ messages in thread
From: Arvind Yadav @ 2017-08-28 4:29 UTC (permalink / raw)
To: mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w,
dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w,
dledford-H+wXaHxf7aLQT0dZR+AlfA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] IB/hfi1: constify vm_operations_struct
@ 2017-08-28 4:29 ` Arvind Yadav
0 siblings, 0 replies; 3+ 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] 3+ messages in thread
* Re: [PATCH] IB/hfi1: constify vm_operations_struct
2017-08-28 4:29 ` Arvind Yadav
(?)
@ 2017-08-28 23:17 ` Doug Ledford
-1 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2017-08-28 23:17 UTC (permalink / raw)
To: Arvind Yadav, mike.marciniszyn, dennis.dalessandro, sean.hefty,
hal.rosenstock
Cc: linux-kernel, linux-rdma
On Mon, 2017-08-28 at 09:59 +0530, Arvind Yadav wrote:
> 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>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-28 23:17 UTC | newest]
Thread overview: 3+ 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 4:29 ` Arvind Yadav
2017-08-28 23:17 ` Doug Ledford
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.