diff options
author | Jack Steiner <steiner@sgi.com> | 2008-07-30 01:34:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 12:41:48 -0400 |
commit | 9ca8e40c130c906c1060d105e63628410c860261 (patch) | |
tree | f43ec77a814039d2317c3012810b049c221e14ec /drivers/misc/sgi-gru/grufile.c | |
parent | 3d919e5f6b440bb0cc7996eb7628b29be09e6343 (diff) |
GRU Driver V3: fixes to resolve code review comments
Fixes problems identified in a code review:
- add comment with high level dscription of the GRU
- prepend "gru_" to all global names
- delete unused function
- couple of trivial bug fixes
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/grufile.c')
-rw-r--r-- | drivers/misc/sgi-gru/grufile.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index 09c9c65ff9d1..23c91f5f6b61 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c | |||
@@ -112,6 +112,10 @@ static int gru_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
112 | if ((vma->vm_flags & (VM_SHARED | VM_WRITE)) != (VM_SHARED | VM_WRITE)) | 112 | if ((vma->vm_flags & (VM_SHARED | VM_WRITE)) != (VM_SHARED | VM_WRITE)) |
113 | return -EPERM; | 113 | return -EPERM; |
114 | 114 | ||
115 | if (vma->vm_start & (GRU_GSEG_PAGESIZE - 1) || | ||
116 | vma->vm_end & (GRU_GSEG_PAGESIZE - 1)) | ||
117 | return -EINVAL; | ||
118 | |||
115 | vma->vm_flags |= | 119 | vma->vm_flags |= |
116 | (VM_IO | VM_DONTCOPY | VM_LOCKED | VM_DONTEXPAND | VM_PFNMAP | | 120 | (VM_IO | VM_DONTCOPY | VM_LOCKED | VM_DONTEXPAND | VM_PFNMAP | |
117 | VM_RESERVED); | 121 | VM_RESERVED); |
@@ -471,8 +475,8 @@ struct vm_operations_struct gru_vm_ops = { | |||
471 | module_init(gru_init); | 475 | module_init(gru_init); |
472 | module_exit(gru_exit); | 476 | module_exit(gru_exit); |
473 | 477 | ||
474 | module_param(options, ulong, 0644); | 478 | module_param(gru_options, ulong, 0644); |
475 | MODULE_PARM_DESC(options, "Various debug options"); | 479 | MODULE_PARM_DESC(gru_options, "Various debug options"); |
476 | 480 | ||
477 | MODULE_AUTHOR("Silicon Graphics, Inc."); | 481 | MODULE_AUTHOR("Silicon Graphics, Inc."); |
478 | MODULE_LICENSE("GPL"); | 482 | MODULE_LICENSE("GPL"); |