Commit 35301b87 authored by David Kershner's avatar David Kershner Committed by Greg Kroah-Hartman

staging: unisys: visorbus: get rid of POSTCODEs in save_crash_msg

Replace POSTCODES in save_crash_msg with dev_err handling.
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 804aab3b
...@@ -474,15 +474,14 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ) ...@@ -474,15 +474,14 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
saved_crash_message_count), saved_crash_message_count),
&local_crash_msg_count, sizeof(u16)); &local_crash_msg_count, sizeof(u16));
if (err) { if (err) {
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0, dev_err(&chipset_dev->acpi_device->dev,
DIAG_SEVERITY_ERR); "failed to read message count\n");
return err; return err;
} }
if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) { if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
POSTCODE_LINUX(CRASH_DEV_COUNT_FAILURE_PC, 0, dev_err(&chipset_dev->acpi_device->dev,
local_crash_msg_count, "invalid number of messages\n");
DIAG_SEVERITY_ERR);
return -EIO; return -EIO;
} }
...@@ -491,8 +490,8 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ) ...@@ -491,8 +490,8 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
saved_crash_message_offset), saved_crash_message_offset),
&local_crash_msg_offset, sizeof(u32)); &local_crash_msg_offset, sizeof(u32));
if (err) { if (err) {
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0, dev_err(&chipset_dev->acpi_device->dev,
DIAG_SEVERITY_ERR); "failed to read offset\n");
return err; return err;
} }
...@@ -504,8 +503,8 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ) ...@@ -504,8 +503,8 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
msg, msg,
sizeof(struct controlvm_message)); sizeof(struct controlvm_message));
if (err) { if (err) {
POSTCODE_LINUX(SAVE_MSG_DEV_FAILURE_PC, 0, 0, dev_err(&chipset_dev->acpi_device->dev,
DIAG_SEVERITY_ERR); "failed to write dev msg\n");
return err; return err;
} }
break; break;
...@@ -515,13 +514,14 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ) ...@@ -515,13 +514,14 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
msg, msg,
sizeof(struct controlvm_message)); sizeof(struct controlvm_message));
if (err) { if (err) {
POSTCODE_LINUX(SAVE_MSG_BUS_FAILURE_PC, 0, 0, dev_err(&chipset_dev->acpi_device->dev,
DIAG_SEVERITY_ERR); "failed to write bus msg\n");
return err; return err;
} }
break; break;
default: default:
pr_info("Invalid crash_obj_type\n"); dev_err(&chipset_dev->acpi_device->dev,
"Invalid crash_obj_type\n");
break; break;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment