From: Laurent Pinchart Date: Thu, 31 Jul 2014 00:34:06 +0000 (+0900) Subject: dmaengine: shdma: Allocate cyclic sg list dynamically X-Git-Tag: cleanup-for-v3.18~47^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4415b03abb0aacd937010f13310b7fa437b9ad7d;p=pandora-kernel.git dmaengine: shdma: Allocate cyclic sg list dynamically The sg list used to prepare cyclic DMA descriptors is currently allocated statically on the stack as an array of 32 elements. This makes the shdma_prep_dma_cyclic() function consume a lot of stack space, as reported by the compiler: drivers/dma/sh/shdma-base.c: In function ‘shdma_prep_dma_cyclic’: drivers/dma/sh/shdma-base.c:715:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] Given the limited Linux kernel stack size, this could lead to stack overflows. Fix the problem by allocating the sg list dynamically. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman Signed-off-by: Vinod Koul --- Reading git-diff-tree failed