[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210809121931.2519-1-caihuoqing@baidu.com>
Date: Mon, 9 Aug 2021 20:19:31 +0800
From: Cai Huoqing <caihuoqing@...du.com>
To: <saeedm@...dia.com>, <leon@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
Cai Huoqing <caihuoqing@...du.com>
Subject: [PATCH v2] net/mlx5e: Make use of mlx5_core_warn()
to replace printk(KERN_WARNING ...) with mlx5_core_warn() kindly
if we use mlx5_core_warn(), the prefix "mlx5:" not needed
Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index e5c4344a114e..304cca0f54d3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2702,7 +2702,8 @@ 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);
+ mlx5_core_warn(priv->mdev,
+ "can't set and add to the same HW field (%x)\n", f->field);
return -EOPNOTSUPP;
}
@@ -2741,8 +2742,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);
+ mlx5_core_warn(priv->mdev,
+ "rewrite of few sub-fields (mask %lx) isn't offloaded\n",
+ mask);
return -EOPNOTSUPP;
}
--
2.25.1
Powered by blists - more mailing lists