From 1ccb4fd877e17fe86fde19749029b6888036b4bd Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 7 Jun 2010 20:50:33 -0700 Subject: [PATCH] --- yaml --- r: 204406 b: refs/heads/master c: 2fda16d79316eb37a3e0e09f0084623905221be8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/cris/arch-v32/mm/intmem.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 950d15544c21..c7b76db73adb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c20cbe46bd5c13444e30cefc997704514dc74cc5 +refs/heads/master: 2fda16d79316eb37a3e0e09f0084623905221be8 diff --git a/trunk/arch/cris/arch-v32/mm/intmem.c b/trunk/arch/cris/arch-v32/mm/intmem.c index 9e8b69cdf19e..1b17d92cef8e 100644 --- a/trunk/arch/cris/arch-v32/mm/intmem.c +++ b/trunk/arch/cris/arch-v32/mm/intmem.c @@ -33,8 +33,8 @@ static void crisv32_intmem_init(void) { static int initiated = 0; if (!initiated) { - struct intmem_allocation* alloc = - (struct intmem_allocation*)kmalloc(sizeof *alloc, GFP_KERNEL); + struct intmem_allocation* alloc; + alloc = kmalloc(sizeof *alloc, GFP_KERNEL); INIT_LIST_HEAD(&intmem_allocations); intmem_virtual = ioremap(MEM_INTMEM_START + RESERVED_SIZE, MEM_INTMEM_SIZE - RESERVED_SIZE); @@ -62,9 +62,8 @@ void* crisv32_intmem_alloc(unsigned size, unsigned align) if (allocation->status == STATUS_FREE && allocation->size >= size + alignment) { if (allocation->size > size + alignment) { - struct intmem_allocation* alloc = - (struct intmem_allocation*) - kmalloc(sizeof *alloc, GFP_ATOMIC); + struct intmem_allocation* alloc; + alloc = kmalloc(sizeof *alloc, GFP_ATOMIC); alloc->status = STATUS_FREE; alloc->size = allocation->size - size - alignment; @@ -74,9 +73,7 @@ void* crisv32_intmem_alloc(unsigned size, unsigned align) if (alignment) { struct intmem_allocation *tmp; - tmp = (struct intmem_allocation *) - kmalloc(sizeof *tmp, - GFP_ATOMIC); + tmp = kmalloc(sizeof *tmp, GFP_ATOMIC); tmp->offset = allocation->offset; tmp->size = alignment; tmp->status = STATUS_FREE;