Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1721007
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] IB/hfi1: constify vm_operations_struct |
| Date | 2017-08-28 06:30 +0200 |
| Message-ID | <ujjQt-Pw-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] IB/hfi1: constify vm_operations_struct Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-28 06:30 +0200 Re: [PATCH] IB/hfi1: constify vm_operations_struct Doug Ledford <dledford@redhat.com> - 2017-08-29 01:20 +0200
csiph-web