2.6-mm swapped kmalloc args.
Subsystems (2)
Repeat after me Cris developers.. "Size, then flags." :-)
aacraid suffers the same affliction. Yay for type-unsafe interfaces.
Signed-off-by Dave Jones <[email protected]>
arch/cris/arch-v32/mm/intmem.c renamed from arch/cris/arch-v32/mm/intmem.c~ +3 -3
@@ -28,7 +28,7 @@ static void crisv32_intmem_init(void)static int initiated =0 ;if (!initiated) {struct intmem_allocation * alloc = - (struct intmem_allocation *)kmalloc (GFP_KERNEL ,sizeof *alloc); + (struct intmem_allocation *)kmalloc (sizeof *alloc,GFP_KERNEL );INIT_LIST_HEAD (&intmem_allocations); intmem_virtual =ioremap (MEM_INTMEM_START ,MEM_INTMEM_SIZE ); initiated =1 ;
@@ -57,7 +57,7 @@ void* crisv32_intmem_alloc(unsigned sizeif (allocation->size > size + alignment) {struct intmem_allocation * alloc = (struct intmem_allocation *) -kmalloc (GFP_ATOMIC ,sizeof *alloc); +kmalloc (sizeof *alloc,GFP_ATOMIC ); alloc->status =STATUS_FREE ; alloc->size = allocation->size - size - alignment; alloc->offset = allocation->offset + size;
@@ -66,7 +66,7 @@ void* crisv32_intmem_alloc(unsigned sizeif (alignment) {struct intmem_allocation * tmp; tmp = (struct intmem_allocation *) -kmalloc (GFP_ATOMIC ,sizeof *tmp); +kmalloc (sizeof *tmp,GFP_ATOMIC ); tmp->offset = allocation->offset; tmp->size = alignment; tmp->status =STATUS_FREE ;
drivers/scsi/aacraid/commctrl.c renamed from drivers/scsi/aacraid/commctrl.c~ +1 -1
@@ -469,7 +469,7 @@ static int aac_send_raw_srb(struct aac_d goto cleanup; } - user_srbcmd =kmalloc (GFP_KERNEL , fibsize); + user_srbcmd =kmalloc (fibsize,GFP_KERNEL );if (!user_srbcmd) {dprintk ((KERN_DEBUG "aacraid: Could not make a copy of the srb\n" )); rcode = -ENOMEM ;
Quoting Dave Jones <[email protected]>:
Quoted 28 lines
Repeat after me Cris developers.. "Size, then flags." :-)
aacraid suffers the same affliction. Yay for type-unsafe interfaces.
Signed-off-by Dave Jones <[email protected]>arch/cris/arch-v32/mm/intmem.c renamed from arch/cris/arch-v32/mm/intmem.c~ +2
-2@@ -28,7 +28,7 @@ static void crisv32_intmem_init(void)static int initiated =0 ;if (!initiated) {struct intmem_allocation * alloc = - (struct intmem_allocation *)kmalloc (GFP_KERNEL ,sizeof *alloc); + (struct intmem_allocation *)kmalloc (sizeof *alloc,GFP_KERNEL );INIT_LIST_HEAD (&intmem_allocations); intmem_virtual =ioremap (MEM_INTMEM_START ,MEM_INTMEM_SIZE ); initiated =1 ;@@ -57,7 +57,7 @@ void* crisv32_intmem_alloc(unsigned sizeif (allocation->size > size + alignment) {struct intmem_allocation * alloc = (struct intmem_allocation *) -kmalloc (GFP_ATOMIC ,sizeof *alloc); +kmalloc (sizeof *alloc,GFP_ATOMIC ); alloc->status =STATUS_FREE ; alloc->size = allocation->size - size - alignment; alloc->offset = allocation->offset + size;
arch/cris/arch-v32/mm/intmem.c void* crisv32_intmem_alloc(unsigned size · line 69
Quoted 5 lines
arch/cris/arch-v32/mm/intmem.c renamed from arch/cris/arch-v32/mm/intmem.c~ +1
-1@@ -66,7 +66,7 @@ void* crisv32_intmem_alloc(unsigned sizeif (alignment) {struct intmem_allocation * tmp; tmp = (struct intmem_allocation *) -kmalloc (GFP_ATOMIC ,sizeof *tmp); +kmalloc (sizeof *tmp,GFP_ATOMIC );
What about also removing these void* to struct intmem_allocation* casts?
Signature · 1 line
Greetings, Michael