dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] [v2] dmaengine: dw-edma: fix unnecessary stack usage
@ 2019-07-22 12:44 Arnd Bergmann
  2019-07-22 12:44 ` [PATCH 2/3] [v2] dmaengine: dw-edma: fix __iomem type confusion Arnd Bergmann
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-07-22 12:44 UTC (permalink / raw)
  To: Gustavo Pimentel, Vinod Koul
  Cc: Arnd Bergmann, Dan Williams, Andy Shevchenko, Russell King,
	Joao Pinto, dmaengine, linux-kernel

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>
---
v2: unchanged
---
 drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dw-edma/dw-edma-v0-debugfs.c b/drivers/dma/dw-edma/dw-edma-v0-debugfs.c
index 3226f528cc11..5728b6fe938c 100644
--- a/drivers/dma/dw-edma/dw-edma-v0-debugfs.c
+++ b/drivers/dma/dw-edma/dw-edma-v0-debugfs.c
@@ -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;
 };
 
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-22 14:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 12:44 [PATCH 1/3] [v2] dmaengine: dw-edma: fix unnecessary stack usage Arnd Bergmann
2019-07-22 12:44 ` [PATCH 2/3] [v2] dmaengine: dw-edma: fix __iomem type confusion Arnd Bergmann
2019-07-22 12:44 ` [PATCH 3/3] [v2] dmaengine: dw-edma: fix endianess confusion Arnd Bergmann
2019-07-22 13:34   ` Gustavo Pimentel
2019-07-22 13:33 ` [PATCH 1/3] [v2] dmaengine: dw-edma: fix unnecessary stack usage Gustavo Pimentel
2019-07-22 14:21 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).