From 5794ca78ec757be0a96c5538227d5a7bad227ad7 Mon Sep 17 00:00:00 2001 From: Jonathan Toppins Date: Fri, 6 Dec 2019 20:12:44 -0500 Subject: [PATCH 88/96] [netdrv] bnxt_en: Minor formatting changes in FW devlink_health_reporter Message-id: Patchwork-id: 291375 O-Subject: [PATCH rhel8 04/13] bnxt_en: Minor formatting changes in FW devlink_health_reporter Bugzilla: 1773724 RH-Acked-by: Steve Best RH-Acked-by: David Arcari RH-Acked-by: Jarod Wilson RH-Acked-by: John Linville Minor formatting changes to diagnose cb for FW devlink health reporter. Suggested-by: Jiri Pirko Cc: Jiri Pirko Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski (cherry picked from commit f255ed1c4e4c5ed8171b6e81dce1297df1f1b60c) Bugzilla: 1773724 Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=25154853 Tested: simple boot test Signed-off-by: Jonathan Toppins Signed-off-by: Bruno Meneguele --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c =================================================================== --- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c 2020-02-06 16:23:21.942455948 +0100 +++ src/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c 2020-02-06 16:23:22.198453598 +0100 @@ -29,25 +29,20 @@ val = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG); health_status = val & 0xffff; - if (health_status == BNXT_FW_STATUS_HEALTHY) { - rc = devlink_fmsg_string_pair_put(fmsg, "FW status", - "Healthy;"); - if (rc) - return rc; - } else if (health_status < BNXT_FW_STATUS_HEALTHY) { - rc = devlink_fmsg_string_pair_put(fmsg, "FW status", - "Not yet completed initialization;"); + if (health_status < BNXT_FW_STATUS_HEALTHY) { + rc = devlink_fmsg_string_pair_put(fmsg, "Description", + "Not yet completed initialization"); if (rc) return rc; } else if (health_status > BNXT_FW_STATUS_HEALTHY) { - rc = devlink_fmsg_string_pair_put(fmsg, "FW status", - "Encountered fatal error and cannot recover;"); + rc = devlink_fmsg_string_pair_put(fmsg, "Description", + "Encountered fatal error and cannot recover"); if (rc) return rc; } if (val >> 16) { - rc = devlink_fmsg_u32_pair_put(fmsg, "Error", val >> 16); + rc = devlink_fmsg_u32_pair_put(fmsg, "Error code", val >> 16); if (rc) return rc; }