Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204406
b: refs/heads/master
c: 2fda16d
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and Jiri Kosina committed Jun 16, 2010
1 parent 80fc010 commit 1ccb4fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c20cbe46bd5c13444e30cefc997704514dc74cc5
refs/heads/master: 2fda16d79316eb37a3e0e09f0084623905221be8
13 changes: 5 additions & 8 deletions trunk/arch/cris/arch-v32/mm/intmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 1ccb4fd

Please sign in to comment.