OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d72d6c
)
IB/hfi1: constify vm_operations_struct
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Mon, 28 Aug 2017 04:29:28 +0000
(09:59 +0530)
committer
Doug 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
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hfi1/file_ops.c
b/drivers/infiniband/hw/hfi1/file_ops.c
index
e0fd8fc
..
d893582
100644
(file)
--- 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,
};