Skip to content

Commit d65305b

Browse files
robherringmpe
authored andcommitted
powerpc: 52xx: Make immr_id DT match tables static
In some builds, the mpc52xx_pm_prepare()/lite5200_pm_prepare() functions generate stack size warnings. The addition of 'struct resource' in commit 2500763 ("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 <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
1 parent ef8e341 commit d65305b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/powerpc/platforms/52xx/lite5200_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static int lite5200_pm_begin(suspend_state_t state)
4747
static int lite5200_pm_prepare(void)
4848
{
4949
struct device_node *np;
50-
const struct of_device_id immr_ids[] = {
50+
static const struct of_device_id immr_ids[] = {
5151
{ .compatible = "fsl,mpc5200-immr", },
5252
{ .compatible = "fsl,mpc5200b-immr", },
5353
{ .type = "soc", .compatible = "mpc5200", }, /* lite5200 */

arch/powerpc/platforms/52xx/mpc52xx_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int mpc52xx_set_wakeup_gpio(u8 pin, u8 level)
6060
int mpc52xx_pm_prepare(void)
6161
{
6262
struct device_node *np;
63-
const struct of_device_id immr_ids[] = {
63+
static const struct of_device_id immr_ids[] = {
6464
{ .compatible = "fsl,mpc5200-immr", },
6565
{ .compatible = "fsl,mpc5200b-immr", },
6666
{ .type = "soc", .compatible = "mpc5200", }, /* lite5200 */

0 commit comments

Comments
 (0)