summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/tlb.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-09-26 08:33:00 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 17:49:05 +0200
commit91b165c0594ab78c64f26d26e3174e6dfd60ed9d (patch)
tree0730eefa9d4ce786f7f561e3b40700418d6d0970 /arch/um/kernel/tlb.c
parent[PATCH] uml: Use klibc setjmp/longjmp (diff)
downloadlinux-91b165c0594ab78c64f26d26e3174e6dfd60ed9d.tar.xz
linux-91b165c0594ab78c64f26d26e3174e6dfd60ed9d.zip
[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.c5
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,
int r, w, x;
struct host_vm_op ops[1];
void *flush = NULL;
- int op_index = -1, last_op = sizeof(ops) / sizeof(ops[0]) - 1;
+ int op_index = -1, last_op = ARRAY_SIZE(ops) - 1;
int ret = 0;
- if(mm == NULL) return;
+ if(mm == NULL)
+ return;
ops[0].type = NONE;
for(addr = start_addr; addr < end_addr && !ret;){