]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net/mlx5e: Make use of netdev_warn()
authorCai Huoqing <caihuoqing@baidu.com>
Tue, 10 Aug 2021 02:08:22 +0000 (10:08 +0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 11 Aug 2021 18:14:34 +0000 (11:14 -0700)
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>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index d6ad7328f2988933e5bded46902e2a6b4130d80f..9465a51b6e66edb992a013304daa9c2d5c80f00d 100644 (file)
@@ -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;
                }
 
@@ -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;
                }