From 91b165c0594ab78c64f26d26e3174e6dfd60ed9d Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Mon, 25 Sep 2006 23:33:00 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/kernel/tlb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/um/kernel/tlb.c') 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;){ -- cgit v1.2.3