Unverified Commit 5603a349 authored by Colin Ian King's avatar Colin Ian King Committed by Krzysztof Wilczyński
Browse files

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: default avatarColin Ian King <colin.i.king@gmail.com>
[kwilczynski: refactor array definition]
Signed-off-by: default avatarKrzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent 8400291e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;