diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-09-26 02:33:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:49:05 -0400 |
commit | 91b165c0594ab78c64f26d26e3174e6dfd60ed9d (patch) | |
tree | 0730eefa9d4ce786f7f561e3b40700418d6d0970 /arch/um/kernel/tlb.c | |
parent | 13c06be399902c9ebda08e092edb1614bb4a3761 (diff) |
[PATCH] uml: Use ARRAY_SIZE more assiduously
There were a bunch of missed ARRAY_SIZE opportunities.
Also, some formatting fixes in the affected areas of code.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/tlb.c')
-rw-r--r-- | arch/um/kernel/tlb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index f5b0636f9ad7..cca330edf717 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c | |||
@@ -137,10 +137,11 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr, | |||
137 | int r, w, x; | 137 | int r, w, x; |
138 | struct host_vm_op ops[1]; | 138 | struct host_vm_op ops[1]; |
139 | void *flush = NULL; | 139 | void *flush = NULL; |
140 | int op_index = -1, last_op = sizeof(ops) / sizeof(ops[0]) - 1; | 140 | int op_index = -1, last_op = ARRAY_SIZE(ops) - 1; |
141 | int ret = 0; | 141 | int ret = 0; |
142 | 142 | ||
143 | if(mm == NULL) return; | 143 | if(mm == NULL) |
144 | return; | ||
144 | 145 | ||
145 | ops[0].type = NONE; | 146 | ops[0].type = NONE; |
146 | for(addr = start_addr; addr < end_addr && !ret;){ | 147 | for(addr = start_addr; addr < end_addr && !ret;){ |