From: Jeremy Kerr Date: Fri, 17 Oct 2008 01:02:31 +0000 (+1100) Subject: powerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer X-Git-Tag: v2.6.28-rc1~58^2~32 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=837ef884b702edd1c4514eaed1dbecd48721bd22;p=linux-2.6-omap-h63xx.git 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: Jeremy Kerr --- diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index b6f7b917b56..b73c369cc6f 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c @@ -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); @@ -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;