Commit 837ef884 authored by Jeremy Kerr's avatar Jeremy Kerr

powerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer

No need to zero the entire buffer, just the head and tail indices.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent f027faa2
...@@ -2442,7 +2442,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file) ...@@ -2442,7 +2442,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file)
goto out; 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), SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry),
GFP_KERNEL); GFP_KERNEL);
...@@ -2451,6 +2451,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file) ...@@ -2451,6 +2451,7 @@ static int spufs_switch_log_open(struct inode *inode, struct file *file)
goto out; goto out;
} }
ctx->switch_log->head = ctx->switch_log->tail = 0;
init_waitqueue_head(&ctx->switch_log->wait); init_waitqueue_head(&ctx->switch_log->wait);
rc = 0; rc = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment