Skip to content

Commit f255ed1

Browse files
Vasundhara VolamJakub Kicinski
authored andcommitted
bnxt_en: Minor formatting changes in FW devlink_health_reporter
Minor formatting changes to diagnose cb for FW devlink health reporter. Suggested-by: Jiri Pirko <[email protected]> Cc: Jiri Pirko <[email protected]> Signed-off-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c6a9e7a commit f255ed1

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,20 @@ static int bnxt_fw_reporter_diagnose(struct devlink_health_reporter *reporter,
2929
val = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG);
3030
health_status = val & 0xffff;
3131

32-
if (health_status == BNXT_FW_STATUS_HEALTHY) {
33-
rc = devlink_fmsg_string_pair_put(fmsg, "FW status",
34-
"Healthy;");
35-
if (rc)
36-
return rc;
37-
} else if (health_status < BNXT_FW_STATUS_HEALTHY) {
38-
rc = devlink_fmsg_string_pair_put(fmsg, "FW status",
39-
"Not yet completed initialization;");
32+
if (health_status < BNXT_FW_STATUS_HEALTHY) {
33+
rc = devlink_fmsg_string_pair_put(fmsg, "Description",
34+
"Not yet completed initialization");
4035
if (rc)
4136
return rc;
4237
} else if (health_status > BNXT_FW_STATUS_HEALTHY) {
43-
rc = devlink_fmsg_string_pair_put(fmsg, "FW status",
44-
"Encountered fatal error and cannot recover;");
38+
rc = devlink_fmsg_string_pair_put(fmsg, "Description",
39+
"Encountered fatal error and cannot recover");
4540
if (rc)
4641
return rc;
4742
}
4843

4944
if (val >> 16) {
50-
rc = devlink_fmsg_u32_pair_put(fmsg, "Error", val >> 16);
45+
rc = devlink_fmsg_u32_pair_put(fmsg, "Error code", val >> 16);
5146
if (rc)
5247
return rc;
5348
}

0 commit comments

Comments
 (0)