Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1721010 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-28 06:40 +0200 |
| Last post | 2017-08-29 01:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] IB/rxe: constify vm_operations_struct Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-28 06:40 +0200
Re: [PATCH] IB/rxe: constify vm_operations_struct Doug Ledford <dledford@redhat.com> - 2017-08-29 01:20 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-28 06:40 +0200 |
| Subject | [PATCH] IB/rxe: constify vm_operations_struct |
| Message-ID | <ujk09-Su-7@gated-at.bofh.it> |
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/sw/rxe/rxe_mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_mmap.c b/drivers/infiniband/sw/rxe/rxe_mmap.c
index bd812e0..d22431e 100644
--- a/drivers/infiniband/sw/rxe/rxe_mmap.c
+++ b/drivers/infiniband/sw/rxe/rxe_mmap.c
@@ -76,7 +76,7 @@ static void rxe_vma_close(struct vm_area_struct *vma)
kref_put(&ip->ref, rxe_mmap_release);
}
-static struct vm_operations_struct rxe_vm_ops = {
+static const struct vm_operations_struct rxe_vm_ops = {
.open = rxe_vma_open,
.close = rxe_vma_close,
};
--
1.9.1
[toc] | [next] | [standalone]
| From | Doug Ledford <dledford@redhat.com> |
|---|---|
| Date | 2017-08-29 01:20 +0200 |
| Message-ID | <ujBu2-3iy-9@gated-at.bofh.it> |
| In reply to | #1721010 |
On Mon, 2017-08-28 at 10:00 +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>
Sorry, this bug had already been fixed by a previous patch. Thanks for
your submission though.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web