Skip to content

Commit

Permalink
powerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer
Browse files Browse the repository at this point in the history
No need to zero the entire buffer, just the head and tail indices.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
  • Loading branch information
Jeremy Kerr committed Oct 21, 2008
1 parent f027faa commit 837ef88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/cell/spufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file)
goto out;
}

ctx->switch_log = kzalloc(sizeof(struct switch_log) +
ctx->switch_log = kmalloc(sizeof(struct switch_log) +
SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry),
GFP_KERNEL);

Expand All @@ -2451,6 +2451,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file)
goto out;
}

ctx->switch_log->head = ctx->switch_log->tail = 0;
init_waitqueue_head(&ctx->switch_log->wait);
rc = 0;

Expand Down

0 comments on commit 837ef88

Please sign in to comment.