diff options
| author | Colin Ian King <colin.i.king@gmail.com> | 2025-03-17 14:34:56 +0000 | 
|---|---|---|
| committer | Krzysztof Wilczyński <kwilczynski@kernel.org> | 2025-03-23 12:34:38 +0000 | 
| commit | 2d72d81caccad516ece9f91f86ac65ff1f2c68a2 (patch) | |
| tree | e6472520fe2afcd19856c344bf8bd39cba5ab5b4 | |
| parent | 174cfcf13daf98bc4411a5a24a797d2b2f5546cd (diff) | |
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 <colin.i.king@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
[kwilczynski: commit log, wrap overly long line to 80 columns]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Link: https://lore.kernel.org/r/20250317143456.477901-1-colin.i.king@gmail.com
| -rw-r--r-- | drivers/pci/controller/pcie-brcmstb.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index df944453c53a..942c596e65bb 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -832,8 +832,9 @@ 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; | 
