summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2010-10-30 08:10:41 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-11-29 04:48:21 (GMT)
commit467d93a7ee64a5c8f675589d658ce3b8b502d288 (patch)
tree8eaaedcfc31b2f405778072ba4d0856c513bfa50 /arch
parentcd34206e949b66d3c5fa3e4d2905aa4af29d1b85 (diff)
downloadlinux-fsl-qoriq-467d93a7ee64a5c8f675589d658ce3b8b502d288.tar.xz
powerpc/cell: Use vzalloc rather than vmalloc and memset in spu_alloc_lscsa_std
Hi, We can get rid of a memset in arch/powerpc/platforms/cell/spufs/lscsa_alloc.c::spu_alloc_lscsa_std() by using vzalloc() rather than vmalloc()+memset(). Completely untested patch below since I have no hardware nor tools to compile this. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/cell/spufs/lscsa_alloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
index a101abf..3b894f5 100644
--- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
+++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
@@ -36,10 +36,9 @@ static int spu_alloc_lscsa_std(struct spu_state *csa)
struct spu_lscsa *lscsa;
unsigned char *p;
- lscsa = vmalloc(sizeof(struct spu_lscsa));
+ lscsa = vzalloc(sizeof(struct spu_lscsa));
if (!lscsa)
return -ENOMEM;
- memset(lscsa, 0, sizeof(struct spu_lscsa));
csa->lscsa = lscsa;
/* Set LS pages reserved to allow for user-space mapping. */