summaryrefslogtreecommitdiff
path: root/mm/swap_slots.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-06-18 13:15:06 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2019-06-28 16:03:59 -0700
commit5233794b179136d597b84188c1285148f07012e6 (patch)
tree692403786274b37ba322ef93950bcc9f54cff405 /mm/swap_slots.c
parentf72e6c3e17be568138d8e4855ac2734d251a6913 (diff)
net/mlx5e: reduce stack usage in mlx5_eswitch_termtbl_create
Putting an empty 'mlx5_flow_spec' structure on the stack is a bit wasteful and causes a warning on 32-bit architectures when building with clang -fsanitize-coverage: drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c: In function 'mlx5_eswitch_termtbl_create': drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c:90:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Since the structure is never written to, we can statically allocate it to avoid the stack usage. To be on the safe side, mark all subsequent function arguments that we pass it into as 'const' as well. Fixes: 10caabdaad5a ("net/mlx5e: Use termination table for VLAN push actions") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Acked-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'mm/swap_slots.c')
0 files changed, 0 insertions, 0 deletions