Skip to content

Commit 5603a34

Browse files
ColinIanKingkwilczynski
authored andcommitted
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/[email protected] Signed-off-by: Colin Ian King <[email protected]> [kwilczynski: refactor array definition] Signed-off-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]>
1 parent 8400291 commit 5603a34

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/pci/controller/dwc/pcie-rcar-gen4.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,12 @@ static int rcar_gen4_pcie_reg_test_bit(struct rcar_gen4_pcie *rcar,
606606
static int rcar_gen4_pcie_download_phy_firmware(struct rcar_gen4_pcie *rcar)
607607
{
608608
/* The check_addr values are magical numbers in the datasheet */
609-
const u32 check_addr[] = { 0x00101018, 0x00101118, 0x00101021, 0x00101121};
609+
static const u32 check_addr[] = {
610+
0x00101018,
611+
0x00101118,
612+
0x00101021,
613+
0x00101121,
614+
};
610615
struct dw_pcie *dw = &rcar->dw;
611616
const struct firmware *fw;
612617
unsigned int i, timeout;

0 commit comments

Comments
 (0)