]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.arch/ppc-spufs-08-Use-kmalloc-rather-than-kzalloc-for-s.patch
Revert "Move xen patchset to new version's subdir."
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.arch / ppc-spufs-08-Use-kmalloc-rather-than-kzalloc-for-s.patch
1 Subject: Use kmalloc rather than kzalloc for switch log buffer
2 From: Jeremy Kerr <jk@ozlabs.org>
3 References: 447133 - LTC50070
4
5 No need to zero the entire buffer, just the head and tail indices.
6
7 Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
8 Signed-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