mirror of
https://github.com/torvalds/linux.git
synced 2025-11-04 18:49:34 +02:00
net: dsa: rzn1_a5psw: Make the read-only array offsets static const
Don't populate the read-only array offsets on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20250417161353.490219-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
eff59eb102
commit
f7ca612018
1 changed files with 3 additions and 2 deletions
|
|
@ -337,8 +337,9 @@ static void a5psw_port_rx_block_set(struct a5psw *a5psw, int port, bool block)
|
||||||
static void a5psw_flooding_set_resolution(struct a5psw *a5psw, int port,
|
static void a5psw_flooding_set_resolution(struct a5psw *a5psw, int port,
|
||||||
bool set)
|
bool set)
|
||||||
{
|
{
|
||||||
u8 offsets[] = {A5PSW_UCAST_DEF_MASK, A5PSW_BCAST_DEF_MASK,
|
static const u8 offsets[] = {
|
||||||
A5PSW_MCAST_DEF_MASK};
|
A5PSW_UCAST_DEF_MASK, A5PSW_BCAST_DEF_MASK, A5PSW_MCAST_DEF_MASK
|
||||||
|
};
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(offsets); i++)
|
for (i = 0; i < ARRAY_SIZE(offsets); i++)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue