Skip to content

Commit e334c01

Browse files
ColinIanKingmiquelraynal
authored andcommitted
mtd: parsers: bcm47xxpart: make read-only array possible_nvram_sizes static const
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 <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent ea265e4 commit e334c01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/parsers/bcm47xxpart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int bcm47xxpart_parse(struct mtd_info *master,
9595
uint32_t blocksize = master->erasesize;
9696
int trx_parts[2]; /* Array with indexes of TRX partitions */
9797
int trx_num = 0; /* Number of found TRX partitions */
98-
int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, };
98+
static const int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, };
9999
int err;
100100

101101
/*

0 commit comments

Comments
 (0)