PCI: brcmstb: make const read-only arrays static
Subsystems (6)
PATCH 1/1 PCI: brcmstb: make const read-only arrays static
Don't populate the const read-only arrays data and regs on the stack at run time, instead make them static.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/pci/controller/pcie-brcmstb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/controller/pcie-brcmstb.c +2 -2
@@ -832,8 +832,8 @@ static int brcm_pcie_perst_set_generic(struct brcm_pcie *pcie, u32 val)static int brcm_pcie_post_setup_bcm2712 (struct brcm_pcie *pcie) { -const u16 data[] = {0x50b9 ,0xbda1 ,0x0094 ,0x97b4 ,0x5030 ,0x5030 ,0x0007 }; -const u8 regs[] = {0x16 ,0x17 ,0x18 ,0x19 ,0x1b ,0x1c ,0x1e }; +static const u16 data[] = {0x50b9 ,0xbda1 ,0x0094 ,0x97b4 ,0x5030 ,0x5030 ,0x0007 }; +static const u8 regs[] = {0x16 ,0x17 ,0x18 ,0x19 ,0x1b ,0x1c ,0x1e };int ret, i;u32 tmp;
Signature · 1 line
2.47.2
Quoted 4 lines · Colin Ian King
Don't populate the const read-only arrays data and regs on the stack at run time, instead make them static.
Signed-off-by Colin Ian King <[email protected]>
Reviewed-by Florian Fainelli <[email protected]>
Signature · 1 line
Florian
Krzysztof Wilczyński
AppliedHello,
Quoted 2 lines
Don't populate the const read-only arrays data and regs on the stack at run time, instead make them static.
Applied to controller/brcmstb, thank you!
Krzysztof