Skip to content
Commit b6b6cc9a authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jakub Kicinski
Browse files

net: stmmac: selftest: avoid large stack usage

Putting a struct stmmac_rss object on the stack is a bad idea,
as it exceeds the warning limit for a stack frame on 32-bit architectures:

drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1221:12: error: stack frame size of 1208 bytes in function '__stmmac_test_l3filt' [-Werror,-Wframe-larger-than=]
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1338:12: error: stack frame size of 1208 bytes in function '__stmmac_test_l4filt' [-Werror,-Wframe-larger-than=]

As the object is the trivial empty case, change the called function
to accept a NULL pointer to mean the same thing and remove the
large variable in the two callers.

Fixes: 4647e021

 ("net: stmmac: selftests: Add selftest for L3/L4 Filters")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarJose Abreu <joabreu@synopsys.com>
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent a8d570de
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment