mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
net/mlx5e: Zero-init DIM structures
Initialize structs to avoid unexpected behavior. No immediate issue in current code, structs are return values, it's safer to initialize. Signed-off-by: Lama Kayal <lkayal@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
ab57a912be
commit
771a563ea0
|
|
@ -201,7 +201,7 @@ int mlx5e_validate_params(struct mlx5_core_dev *mdev, struct mlx5e_params *param
|
|||
|
||||
static struct dim_cq_moder mlx5e_get_def_tx_moderation(u8 cq_period_mode)
|
||||
{
|
||||
struct dim_cq_moder moder;
|
||||
struct dim_cq_moder moder = {};
|
||||
|
||||
moder.cq_period_mode = cq_period_mode;
|
||||
moder.pkts = MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_PKTS;
|
||||
|
|
@ -214,7 +214,7 @@ static struct dim_cq_moder mlx5e_get_def_tx_moderation(u8 cq_period_mode)
|
|||
|
||||
static struct dim_cq_moder mlx5e_get_def_rx_moderation(u8 cq_period_mode)
|
||||
{
|
||||
struct dim_cq_moder moder;
|
||||
struct dim_cq_moder moder = {};
|
||||
|
||||
moder.cq_period_mode = cq_period_mode;
|
||||
moder.pkts = MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_PKTS;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user