Blame SOURCES/0193-netdrv-net-mlx5e-Use-netdev_warn-instead-of-pr_err-f.patch

d8f823
From 9a16b3d75ba103147a6c45f89ab433538767b726 Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Tue, 12 May 2020 10:55:09 -0400
d8f823
Subject: [PATCH 193/312] [netdrv] net/mlx5e: Use netdev_warn() instead of
d8f823
 pr_err() for errors
d8f823
d8f823
Message-id: <20200512105530.4207-104-ahleihel@redhat.com>
d8f823
Patchwork-id: 306975
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1789382 103/124] net/mlx5e: Use netdev_warn() instead of pr_err() for errors
d8f823
Bugzilla: 1789382
d8f823
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
d8f823
RH-Acked-by: Kamal Heib <kheib@redhat.com>
d8f823
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
d8f823
d8f823
Bugzilla: http://bugzilla.redhat.com/1789382
d8f823
Upstream: v5.7-rc1
d8f823
d8f823
commit 4ccd83f40cdc0c5b3b93cd176f9583994832f5f7
d8f823
Author: Roi Dayan <roid@mellanox.com>
d8f823
Date:   Tue Feb 18 15:24:39 2020 +0200
d8f823
d8f823
    net/mlx5e: Use netdev_warn() instead of pr_err() for errors
d8f823
d8f823
    This is for added netdev prefix that helps identify
d8f823
    the source of the message.
d8f823
d8f823
    Signed-off-by: Roi Dayan <roid@mellanox.com>
d8f823
    Reviewed-by: Eli Cohen <eli@mellanox.com>
d8f823
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
d8f823
d8f823
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
d8f823
---
d8f823
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 17 +++++++++++------
d8f823
 1 file changed, 11 insertions(+), 6 deletions(-)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
d8f823
index 6c37a9e7912e..2fc1a0879e5d 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
d8f823
@@ -3360,8 +3360,9 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
d8f823
 			if (attr->out_count >= MLX5_MAX_FLOW_FWD_VPORTS) {
d8f823
 				NL_SET_ERR_MSG_MOD(extack,
d8f823
 						   "can't support more output ports, can't offload forwarding");
d8f823
-				pr_err("can't support more than %d output ports, can't offload forwarding\n",
d8f823
-				       attr->out_count);
d8f823
+				netdev_warn(priv->netdev,
d8f823
+					    "can't support more than %d output ports, can't offload forwarding\n",
d8f823
+					    attr->out_count);
d8f823
 				return -EOPNOTSUPP;
d8f823
 			}
d8f823
 
d8f823
@@ -3439,8 +3440,10 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
d8f823
 				if (!mlx5e_is_valid_eswitch_fwd_dev(priv, out_dev)) {
d8f823
 					NL_SET_ERR_MSG_MOD(extack,
d8f823
 							   "devices are not on same switch HW, can't offload forwarding");
d8f823
-					pr_err("devices %s %s not on same switch HW, can't offload forwarding\n",
d8f823
-					       priv->netdev->name, out_dev->name);
d8f823
+					netdev_warn(priv->netdev,
d8f823
+						    "devices %s %s not on same switch HW, can't offload forwarding\n",
d8f823
+						    priv->netdev->name,
d8f823
+						    out_dev->name);
d8f823
 					return -EOPNOTSUPP;
d8f823
 				}
d8f823
 
d8f823
@@ -3459,8 +3462,10 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv,
d8f823
 			} else {
d8f823
 				NL_SET_ERR_MSG_MOD(extack,
d8f823
 						   "devices are not on same switch HW, can't offload forwarding");
d8f823
-				pr_err("devices %s %s not on same switch HW, can't offload forwarding\n",
d8f823
-				       priv->netdev->name, out_dev->name);
d8f823
+				netdev_warn(priv->netdev,
d8f823
+					    "devices %s %s not on same switch HW, can't offload forwarding\n",
d8f823
+					    priv->netdev->name,
d8f823
+					    out_dev->name);
d8f823
 				return -EINVAL;
d8f823
 			}
d8f823
 			}
d8f823
-- 
d8f823
2.13.6
d8f823