* [PATCH][next] PCI: brcmstb: make const read-only arrays static
@ 2025-03-17 14:34 Colin Ian King
2025-03-17 18:50 ` Florian Fainelli
2025-03-23 12:38 ` Krzysztof Wilczyński
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2025-03-17 14:34 UTC (permalink / raw)
To: Jim Quinlan, Nicolas Saenz Julienne, Florian Fainelli,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, linux-pci, linux-rpi-kernel, linux-arm-kernel
Cc: kernel-janitors, linux-kernel
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>
---
drivers/pci/controller/pcie-brcmstb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 8b2b099e81eb..d258b571f642 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -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;
--
2.47.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH][next] PCI: brcmstb: make const read-only arrays static
2025-03-17 14:34 [PATCH][next] PCI: brcmstb: make const read-only arrays static Colin Ian King
@ 2025-03-17 18:50 ` Florian Fainelli
2025-03-23 12:38 ` Krzysztof Wilczyński
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2025-03-17 18:50 UTC (permalink / raw)
To: Colin Ian King, Jim Quinlan, Nicolas Saenz Julienne,
Florian Fainelli, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, linux-pci,
linux-rpi-kernel, linux-arm-kernel
Cc: kernel-janitors, linux-kernel
On 3/17/25 07:34, Colin Ian King wrote:
> 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>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] PCI: brcmstb: make const read-only arrays static
2025-03-17 14:34 [PATCH][next] PCI: brcmstb: make const read-only arrays static Colin Ian King
2025-03-17 18:50 ` Florian Fainelli
@ 2025-03-23 12:38 ` Krzysztof Wilczyński
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Wilczyński @ 2025-03-23 12:38 UTC (permalink / raw)
To: Colin Ian King
Cc: Jim Quinlan, Nicolas Saenz Julienne, Florian Fainelli,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, linux-pci,
linux-rpi-kernel, linux-arm-kernel, kernel-janitors, linux-kernel
Hello,
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-23 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-17 14:34 [PATCH][next] PCI: brcmstb: make const read-only arrays static Colin Ian King
2025-03-17 18:50 ` Florian Fainelli
2025-03-23 12:38 ` Krzysztof Wilczyński
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox