* [PATCH] powerpc: 52xx: Make immr_id DT match tables static
@ 2023-06-14 17:17 Rob Herring
2023-07-03 5:26 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2023-06-14 17:17 UTC (permalink / raw)
To: Anatolij Gustschin, Michael Ellerman, Nicholas Piggin,
Christophe Leroy
Cc: linuxppc-dev, kernel test robot, linux-kernel
In some builds, the mpc52xx_pm_prepare()/lite5200_pm_prepare() functions
generate stack size warnings. The addition of 'struct resource' in commit
2500763dd3db ("powerpc: Use of_address_to_resource()") grew the stack size
and is blamed for the warnings. However, the real issue is there's no
reason the 'struct of_device_id immr_ids' DT match tables need to be on
the stack as they are constant. Declare them as static to move them off
the stack.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306130405.uTv5yOZD-lkp@intel.com/
Signed-off-by: Rob Herring <robh@kernel.org>
---
arch/powerpc/platforms/52xx/lite5200_pm.c | 2 +-
arch/powerpc/platforms/52xx/mpc52xx_pm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c
index ee29b63fca16..4900f5f48cce 100644
--- a/arch/powerpc/platforms/52xx/lite5200_pm.c
+++ b/arch/powerpc/platforms/52xx/lite5200_pm.c
@@ -47,7 +47,7 @@ static int lite5200_pm_begin(suspend_state_t state)
static int lite5200_pm_prepare(void)
{
struct device_node *np;
- const struct of_device_id immr_ids[] = {
+ static const struct of_device_id immr_ids[] = {
{ .compatible = "fsl,mpc5200-immr", },
{ .compatible = "fsl,mpc5200b-immr", },
{ .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
index 549b3629e39a..f0c31ae15da5 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
@@ -60,7 +60,7 @@ int mpc52xx_set_wakeup_gpio(u8 pin, u8 level)
int mpc52xx_pm_prepare(void)
{
struct device_node *np;
- const struct of_device_id immr_ids[] = {
+ static const struct of_device_id immr_ids[] = {
{ .compatible = "fsl,mpc5200-immr", },
{ .compatible = "fsl,mpc5200b-immr", },
{ .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] powerpc: 52xx: Make immr_id DT match tables static
2023-06-14 17:17 [PATCH] powerpc: 52xx: Make immr_id DT match tables static Rob Herring
@ 2023-07-03 5:26 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-07-03 5:26 UTC (permalink / raw)
To: Anatolij Gustschin, Nicholas Piggin, Christophe Leroy,
Rob Herring
Cc: linuxppc-dev, kernel test robot, linux-kernel
On Wed, 14 Jun 2023 11:17:23 -0600, Rob Herring wrote:
> In some builds, the mpc52xx_pm_prepare()/lite5200_pm_prepare() functions
> generate stack size warnings. The addition of 'struct resource' in commit
> 2500763dd3db ("powerpc: Use of_address_to_resource()") grew the stack size
> and is blamed for the warnings. However, the real issue is there's no
> reason the 'struct of_device_id immr_ids' DT match tables need to be on
> the stack as they are constant. Declare them as static to move them off
> the stack.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc: 52xx: Make immr_id DT match tables static
https://git.kernel.org/powerpc/c/d65305bfa6f797712b928bd8f4781380726b70a0
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-03 5:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-14 17:17 [PATCH] powerpc: 52xx: Make immr_id DT match tables static Rob Herring
2023-07-03 5:26 ` Michael Ellerman
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).