]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dmaengine: dw-edma: fix unnecessary stack usage
authorArnd Bergmann <arnd@arndb.de>
Mon, 22 Jul 2019 12:44:43 +0000 (14:44 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 22 Jul 2019 15:27:35 +0000 (20:57 +0530)
Putting large constant data on the stack causes unnecessary overhead
and stack usage:

drivers/dma/dw-edma/dw-edma-v0-debugfs.c:285:6: error: stack frame size of 1376 bytes in function 'dw_edma_v0_debugfs_on' [-Werror,-Wframe-larger-than=]

Mark the variable 'static const' in order for the compiler to move it
into the .rodata section where it does no such harm.

Fixes: 305aebeff879 ("dmaengine: Add Synopsys eDMA IP version 0 debugfs support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Link: https://lore.kernel.org/r/20190722124457.1093886-1-arnd@arndb.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dw-edma/dw-edma-v0-debugfs.c

index 3226f528cc11395409ae503f45ce9816ead6d8bc..5728b6fe938c4c88b9e90ddf0e0a76434ce2a500 100644 (file)
@@ -48,7 +48,7 @@ static struct {
 } lim[2][EDMA_V0_MAX_NR_CH];
 
 struct debugfs_entries {
-       char                                    name[24];
+       const char                              *name;
        dma_addr_t                              *reg;
 };