projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea265e4
)
mtd: parsers: bcm47xxpart: make read-only array possible_nvram_sizes static const
author
Colin Ian King
<colin.i.king@gmail.com>
Thu, 22 Aug 2024 16:46:32 +0000
(17:46 +0100)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Fri, 23 Aug 2024 17:25:49 +0000
(19:25 +0200)
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>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20240822164632.638171-1-colin.i.king@gmail.com
drivers/mtd/parsers/bcm47xxpart.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/parsers/bcm47xxpart.c
b/drivers/mtd/parsers/bcm47xxpart.c
index 13daf9bffd081912a1f6036833e1a4d87a0662de..49c8e7f27f218c7dd0a034ac8c8fb2d3c542600b 100644
(file)
--- 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;
/*