diff options
author | Saeed Mahameed <saeedm@mellanox.com> | 2020-05-28 09:16:02 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-05-30 07:20:21 +0300 |
commit | 2553f421f44f4db7579f202b79b69046b579c7b5 (patch) | |
tree | f1b57b294e96b5ab2a0b6c2ccdfa3303263dd5f2 /include/linux/mlx5 | |
parent | 9ff2e92c466dc1aa4d970e5027dfd66b1f32b7bc (diff) | |
download | linux-2553f421f44f4db7579f202b79b69046b579c7b5.tar.xz |
net/mlx5: cmd: Fix memset with byte count warning
Fix sparse warning:
drivers/net/ethernet/mellanox/mlx5/core/cmd.c:1949:15:
warning: memset with byte count of 271720
mlx5_cmd_stats array is too big to be held inline in mlx5_cmd.
Allocate it separately.
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r-- | include/linux/mlx5/driver.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index 6aa6bbd60559..13c0e4556eda 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -298,7 +298,7 @@ struct mlx5_cmd { struct mlx5_cmd_debug dbg; struct cmd_msg_cache cache[MLX5_NUM_COMMAND_CACHES]; int checksum_disabled; - struct mlx5_cmd_stats stats[MLX5_CMD_OP_MAX]; + struct mlx5_cmd_stats *stats; }; struct mlx5_port_caps { |