* [PATCH][next] mtd: parsers: bcm47xxpart: make read-only array possible_nvram_sizes static const
@ 2024-08-22 16:46 Colin Ian King
2024-08-23 17:33 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-08-22 16:46 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, linux-mtd
Cc: kernel-janitors, linux-kernel
Don't populate the read-only array possible_nvram_sizes on the stack at
run time, instead make it static const.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/mtd/parsers/bcm47xxpart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/parsers/bcm47xxpart.c b/drivers/mtd/parsers/bcm47xxpart.c
index 13daf9bffd08..49c8e7f27f21 100644
--- a/drivers/mtd/parsers/bcm47xxpart.c
+++ b/drivers/mtd/parsers/bcm47xxpart.c
@@ -95,7 +95,7 @@ static int bcm47xxpart_parse(struct mtd_info *master,
uint32_t blocksize = master->erasesize;
int trx_parts[2]; /* Array with indexes of TRX partitions */
int trx_num = 0; /* Number of found TRX partitions */
- int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, };
+ static const int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, };
int err;
/*
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][next] mtd: parsers: bcm47xxpart: make read-only array possible_nvram_sizes static const
2024-08-22 16:46 [PATCH][next] mtd: parsers: bcm47xxpart: make read-only array possible_nvram_sizes static const Colin Ian King
@ 2024-08-23 17:33 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2024-08-23 17:33 UTC (permalink / raw)
To: Colin Ian King, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, linux-mtd
Cc: kernel-janitors, linux-kernel
On Thu, 2024-08-22 at 16:46:32 UTC, Colin Ian King wrote:
> Don't populate the read-only array possible_nvram_sizes on the stack at
> run time, instead make it static const.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-23 17:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-22 16:46 [PATCH][next] mtd: parsers: bcm47xxpart: make read-only array possible_nvram_sizes static const Colin Ian King
2024-08-23 17:33 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®