From: Jesper Juhl Date: Sat, 30 Oct 2010 08:10:41 +0000 (+0000) Subject: powerpc/cell: Use vzalloc rather than vmalloc and memset in spu_alloc_lscsa_std X-Git-Tag: upstream/snapshot3+hdmi~12070^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=467d93a7ee64a5c8f675589d658ce3b8b502d288;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Benjamin Herrenschmidt --- 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. */