From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: cns3xxx: Don't allocate PCI addresses on stack
Date: Mon, 25 Aug 2014 12:34:25 +0200 [thread overview]
Message-ID: <2492333.HstnrugmgL@wuerfel> (raw)
In-Reply-To: <1408927894-30858-1-git-send-email-broonie@kernel.org>
On Sunday 24 August 2014 19:51:34 Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> The cns3xxx PCIe code allocates a PCI bus structure on the stack, causing
> warnings due to the excessibe size of the resulting stack frame:
>
> arch/arm/mach-cns3xxx/pcie.c:311:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> Avoid this by dynamically allocating the structure, though I am not
> convinced that we should be locally creating the struct pci_bus in the
> first place.
>
> Signed-off-by: Mark Brown <broonie@linaro.org>
>
We should certainly not make up a pci_bus here just for the purpose
of calling a common code function that comes back through a callback
to the locally defined cns3xxx_pci_read_config/cns3xxx_pci_write_config.
However, refactoring the code to do it right seems like actual work
and I'm not sure we can find anybody to do it, so your hack seems
like the best approximation.
Arnd
next prev parent reply other threads:[~2014-08-25 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 0:51 [PATCH] ARM: cns3xxx: Don't allocate PCI addresses on stack Mark Brown
2014-08-25 10:34 ` Arnd Bergmann [this message]
2014-08-25 11:30 ` Arnd Bergmann
2014-08-26 7:18 ` Mark Brown
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=2492333.HstnrugmgL@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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