]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/ppc-spufs-08-Use-kmalloc-rather-than-kzalloc-for-s.patch
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / ppc-spufs-08-Use-kmalloc-rather-than-kzalloc-for-s.patch
CommitLineData
2cb7cef9
BS
1Subject: Use kmalloc rather than kzalloc for switch log buffer
2From: Jeremy Kerr <jk@ozlabs.org>
3References: 447133 - LTC50070
4
5No need to zero the entire buffer, just the head and tail indices.
6
7Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
8Signed-off-by: Olaf Hering <olh@suse.de>
9---
10 arch/powerpc/platforms/cell/spufs/file.c | 3 ++-
11 1 file changed, 2 insertions(+), 1 deletion(-)
12
13--- a/arch/powerpc/platforms/cell/spufs/file.c
14+++ b/arch/powerpc/platforms/cell/spufs/file.c
15@@ -2445,7 +2445,7 @@ static int spufs_switch_log_open(struct
16 goto out;
17 }
18
19- ctx->switch_log = kzalloc(sizeof(struct switch_log) +
20+ ctx->switch_log = kmalloc(sizeof(struct switch_log) +
21 SWITCH_LOG_BUFSIZE * sizeof(struct switch_log_entry),
22 GFP_KERNEL);
23
24@@ -2454,6 +2454,7 @@ static int spufs_switch_log_open(struct
25 goto out;
26 }
27
28+ ctx->switch_log->head = ctx->switch_log->tail = 0;
29 init_waitqueue_head(&ctx->switch_log->wait);
30 rc = 0;
31