summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2020-02-11 14:32:47 -0800
committerSaeed Mahameed <saeedm@mellanox.com>2020-02-18 19:17:30 -0800
commitb21aef7e71de8fa2124b602f2ccab35947b581cb (patch)
tree0f5a5b2d52d83d0ea7f9355988fac71887c96954 /drivers/net/ethernet/mellanox/mlx5/core/en/health.c
parent0f56d3c5d8ea7afdbd1e48e6b5d432f3c5c2d1bb (diff)
mlx5: Use proper logging and tracing line terminations
netdev_err should use newline termination but mlx5_health_report is used in a trace output function devlink_health_report where no newline should be used. Remove the newlines from a couple formats and add a format string of "%s\n" to the netdev_err call to not directly output the logging string. Also use snprintf to avoid any possible output string overrun. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/health.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/health.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
index 7178f421d2cb..68d019b27642 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
@@ -198,7 +198,7 @@ int mlx5e_health_report(struct mlx5e_priv *priv,
struct devlink_health_reporter *reporter, char *err_str,
struct mlx5e_err_ctx *err_ctx)
{
- netdev_err(priv->netdev, err_str);
+ netdev_err(priv->netdev, "%s\n", err_str);
if (!reporter)
return err_ctx->recover(&err_ctx->ctx);