summaryrefslogtreecommitdiff
path: root/include/linux/mlx5
diff options
context:
space:
mode:
authorSaeed Mahameed <saeedm@mellanox.com>2020-05-27 23:16:02 -0700
committerSaeed Mahameed <saeedm@mellanox.com>2020-05-29 21:20:21 -0700
commit2553f421f44f4db7579f202b79b69046b579c7b5 (patch)
treef1b57b294e96b5ab2a0b6c2ccdfa3303263dd5f2 /include/linux/mlx5
parent9ff2e92c466dc1aa4d970e5027dfd66b1f32b7bc (diff)
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.h2
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 {