Skip to content

Commit

Permalink
net/mlx5e: Make use of netdev_warn()
Browse files Browse the repository at this point in the history
to replace printk(KERN_WARNING ...) with netdev_warn() kindly

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Cai Huoqing authored and Saeed Mahameed committed Aug 11, 2021
1 parent 979aa51 commit 61b6a6c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,9 @@ static int offload_pedit_fields(struct mlx5e_priv *priv,
if (s_mask && a_mask) {
NL_SET_ERR_MSG_MOD(extack,
"can't set and add to the same HW field");
printk(KERN_WARNING "mlx5: can't set and add to the same HW field (%x)\n", f->field);
netdev_warn(priv->netdev,
"mlx5: can't set and add to the same HW field (%x)\n",
f->field);
return -EOPNOTSUPP;
}

Expand Down Expand Up @@ -2741,8 +2743,9 @@ static int offload_pedit_fields(struct mlx5e_priv *priv,
if (first < next_z && next_z < last) {
NL_SET_ERR_MSG_MOD(extack,
"rewrite of few sub-fields isn't supported");
printk(KERN_WARNING "mlx5: rewrite of few sub-fields (mask %lx) isn't offloaded\n",
mask);
netdev_warn(priv->netdev,
"mlx5: rewrite of few sub-fields (mask %lx) isn't offloaded\n",
mask);
return -EOPNOTSUPP;
}

Expand Down

0 comments on commit 61b6a6c

Please sign in to comment.