mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gustavo Pimentel <Gustavo.Pimentel@synopsys.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Gustavo Pimentel <Gustavo.Pimentel@synopsys.com>,
	Vinod Koul <vkoul@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/3] [v2] dmaengine: dw-edma: fix unnecessary stack usage
Date: Mon, 22 Jul 2019 13:33:05 +0000	[thread overview]
Message-ID: <DM6PR12MB4010F8ADBA3F9E92E8762279DAC40@DM6PR12MB4010.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20190722124457.1093886-1-arnd@arndb.de>

On Mon, Jul 22, 2019 at 13:44:43, Arnd Bergmann <arnd@arndb.de> wrote:

> 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


Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>



  parent reply	other threads:[~2019-07-22 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 ` Gustavo Pimentel [this message]
2019-07-22 14:21 ` [PATCH 1/3] [v2] dmaengine: dw-edma: fix unnecessary stack usage Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR12MB4010F8ADBA3F9E92E8762279DAC40@DM6PR12MB4010.namprd12.prod.outlook.com \
    --to=gustavo.pimentel@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®