]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: reduce stack usage in qp_read_field
authorArnd Bergmann <arnd@arndb.de>
Tue, 28 Apr 2020 21:23:47 +0000 (23:23 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 30 May 2020 04:20:20 +0000 (21:20 -0700)
commit72f25653819c2d8c9cb06c024628f3a6f4d36e13
tree70edd25b94bdcb39c638582148a5f1f113ee2490
parentf3cfb0e8e84c7648810452cee21f05d7f8e64e70
net/mlx5: reduce stack usage in qp_read_field

Moving the mlx5_ifc_query_qp_out_bits structure on the stack was a bit
excessive and now causes the compiler to complain on 32-bit architectures:

drivers/net/ethernet/mellanox/mlx5/core/debugfs.c: In function 'qp_read_field':
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:274:1: error: the frame size of 1104 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Revert the previous patch partially to use dynamically allocation as
the code did before. Unfortunately there is no good error handling
in case the allocation fails.

Fixes: 18dfdbdbcb2f ("net/mlx5: Replace hand written QP context struct with automatic getters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c