aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2014-12-09 21:54:56 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-12-10 11:50:33 +1100
commit1c732e3184f0fae0b598be713a386df7d274d48f (patch)
treefd9db2976c9e67a001197ddc8e0e684b7bc19f71
parent261738b521230711aa3d02c0f449114a2eeae5fe (diff)
downloadskiboot-1c732e3184f0fae0b598be713a386df7d274d48f.zip
skiboot-1c732e3184f0fae0b598be713a386df7d274d48f.tar.gz
skiboot-1c732e3184f0fae0b598be713a386df7d274d48f.tar.bz2
FSP/DPO: Fix unused result warnings in DPO driver
Commit c36c5607 added warn_unused_result compilation flag to fsp_queue_msg function....which resulted in multiple warnings in DPO driver. This patch fixes those warnings. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/fsp/fsp-dpo.c50
1 files changed, 46 insertions, 4 deletions
diff --git a/hw/fsp/fsp-dpo.c b/hw/fsp/fsp-dpo.c
index ad2659d..610c7c3 100644
--- a/hw/fsp/fsp-dpo.c
+++ b/hw/fsp/fsp-dpo.c
@@ -55,6 +55,7 @@ static int64_t fsp_opal_get_dpo_status(int64_t *dpo_timeout)
/* Process FSP DPO init message */
static void fsp_process_dpo(struct fsp_msg *msg)
{
+ struct fsp_msg *resp;
u32 cmd = FSP_RSP_INIT_DPO;
int rc;
@@ -63,7 +64,17 @@ static void fsp_process_dpo(struct fsp_msg *msg)
|| (msg->data.bytes[1] != DPO_CMD_SGN_BYTE1)) {
prlog(PR_ERR, PREFIX "Message signatures did not match\n");
cmd |= FSP_STATUS_INVALID_CMD;
- fsp_queue_msg(fsp_mkmsg(cmd, 0), fsp_freemsg);
+ resp = fsp_mkmsg(cmd, 0);
+ if (resp == NULL) {
+ prerror(PREFIX "%s : Message allocation failed\n",
+ __func__);
+ return;
+ }
+ if (fsp_queue_msg(resp, fsp_freemsg)) {
+ fsp_freemsg(resp);
+ prerror(PREFIX "%s : Failed to queue response "
+ "message\n", __func__);
+ }
return;
}
@@ -71,7 +82,17 @@ static void fsp_process_dpo(struct fsp_msg *msg)
if (fsp_dpo_pending) {
prlog(PR_ERR, PREFIX "OPAL is already in DPO pending state\n");
cmd |= FSP_STATUS_INVALID_DPOSTATE;
- fsp_queue_msg(fsp_mkmsg(cmd, 0), fsp_freemsg);
+ resp = fsp_mkmsg(cmd, 0);
+ if (resp == NULL) {
+ prerror(PREFIX "%s : Message allocation failed\n",
+ __func__);
+ return;
+ }
+ if (fsp_queue_msg(resp, fsp_freemsg)) {
+ fsp_freemsg(resp);
+ prerror(PREFIX "%s : Failed to queue response "
+ "message\n", __func__);
+ }
return;
}
@@ -83,13 +104,34 @@ static void fsp_process_dpo(struct fsp_msg *msg)
if (rc) {
prlog(PR_ERR, PREFIX "OPAL message queuing failed\n");
cmd |= FSP_STATUS_GENERIC_ERROR;
- fsp_queue_msg(fsp_mkmsg(cmd, 0), fsp_freemsg);
+ resp = fsp_mkmsg(cmd, 0);
+ if (resp == NULL) {
+ prerror(PREFIX "%s : Message allocation failed\n",
+ __func__);
+ return;
+ }
+ if (fsp_queue_msg(resp, fsp_freemsg)) {
+ fsp_freemsg(resp);
+ prerror(PREFIX "%s : Failed to queue response "
+ "message\n", __func__);
+ }
return;
}
/* Acknowledge the FSP on DPO */
- fsp_queue_msg(fsp_mkmsg(cmd, 0), fsp_freemsg);
+ resp = fsp_mkmsg(cmd, 0);
+ if (resp == NULL) {
+ prerror(PREFIX "%s : Message allocation failed\n", __func__);
+ return;
+ }
+ if (fsp_queue_msg(resp, fsp_freemsg)) {
+ fsp_freemsg(resp);
+ prerror(PREFIX "%s : Failed to queue response message\n",
+ __func__);
+ }
+
fsp_dpo_pending = true;
+
/*
* Sapphire is now in DPO pending state. After first detecting DPO
* condition from Sapphire, the host will have 45 minutes to prepare