summaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/dwc
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-08-22 22:59:41 +0200
committerKrzysztof Wilczyński <kwilczynski@kernel.org>2024-09-01 19:31:04 +0200
commit5603a3491b368faf180472f4bdc6480c13c7385e (patch)
tree003317ccf648ab2c86b38ec33f400afa6bae86e1 /drivers/pci/controller/dwc
parentLinux 6.11-rc1 (diff)
downloadlinux-5603a3491b368faf180472f4bdc6480c13c7385e.tar.xz
linux-5603a3491b368faf180472f4bdc6480c13c7385e.zip
PCI: rcar-gen4: Make read-only const array check_addr static
Don't populate the const read-only array check_addr on the stack at run time, instead make it static. Link: https://lore.kernel.org/linux-pci/20240822205941.643187-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> [kwilczynski: refactor array definition] Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/pci/controller/dwc')
-rw-r--r--drivers/pci/controller/dwc/pcie-rcar-gen4.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/controller/dwc/pcie-rcar-gen4.c b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
index f0f3ebd1a033..7d18853a46de 100644
--- a/drivers/pci/controller/dwc/pcie-rcar-gen4.c
+++ b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
@@ -606,7 +606,12 @@ static int rcar_gen4_pcie_reg_test_bit(struct rcar_gen4_pcie *rcar,
static int rcar_gen4_pcie_download_phy_firmware(struct rcar_gen4_pcie *rcar)
{
/* The check_addr values are magical numbers in the datasheet */
- const u32 check_addr[] = { 0x00101018, 0x00101118, 0x00101021, 0x00101121};
+ static const u32 check_addr[] = {
+ 0x00101018,
+ 0x00101118,
+ 0x00101021,
+ 0x00101121,
+ };
struct dw_pcie *dw = &rcar->dw;
const struct firmware *fw;
unsigned int i, timeout;