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 <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202306130405.uTv5yOZD-lkp@intel.com/ Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230614171724.2403982-1-robh@kernel.org
1 parent ef8e341 commit d65305b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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)