diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2014-12-09 21:52:45 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-12-10 11:50:33 +1100 |
commit | 1e15e9979e29572e84b11f38ad2bec0c1171a712 (patch) | |
tree | 1fa438d1a6a0e08314647f97a1d9f7e743bc5222 /hw | |
parent | bb2d7bf409e9ebaac2ee8e7742d1c78a356de46c (diff) | |
download | skiboot-1e15e9979e29572e84b11f38ad2bec0c1171a712.zip skiboot-1e15e9979e29572e84b11f38ad2bec0c1171a712.tar.gz skiboot-1e15e9979e29572e84b11f38ad2bec0c1171a712.tar.bz2 |
Enable warn_unused_result for fsp_fetch_data_queue()
fsp_fetch_data_queue() internally calls fsp_queue_msg().
So ideally we should consume the result of this function.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/fsp/fsp-codeupdate.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/hw/fsp/fsp-codeupdate.c b/hw/fsp/fsp-codeupdate.c index 4f1a6a5..0d50f0c 100644 --- a/hw/fsp/fsp-codeupdate.c +++ b/hw/fsp/fsp-codeupdate.c @@ -304,6 +304,7 @@ static void fetch_lid_data_complete(struct fsp_msg *msg) uint32_t lid_id, offset; uint16_t id; uint8_t flags, status; + int rc; status = (msg->resp->word1 >> 8) & 0xff; flags = (msg->data.words[0] >> 16) & 0xff; @@ -327,10 +328,16 @@ static void fetch_lid_data_complete(struct fsp_msg *msg) chunk = MARKER_LID_SIZE - offset; if (chunk > 0) { buffer = (void *)PSI_DMA_CODE_UPD + offset; - fsp_fetch_data_queue(flags, id, lid_id, - offset, buffer, &chunk, - fetch_lid_data_complete); - return; + rc = fsp_fetch_data_queue(flags, id, lid_id, + offset, buffer, &chunk, + fetch_lid_data_complete); + + /* If queue msg fails, then continue with marker LID + * validation hoping that we have at least boot side + * information. + */ + if (rc == OPAL_SUCCESS) + return; } break; default: /* Fetch LID call failed */ @@ -341,10 +348,16 @@ static void fetch_lid_data_complete(struct fsp_msg *msg) if (lid_id == P_COM_MARKER_LID_ID && lid_fetch_side == FETCH_BOTH_SIDE) { length = MARKER_LID_SIZE; - fsp_fetch_data_queue(flags, id, T_COM_MARKER_LID_ID, - 0, (void *)PSI_DMA_CODE_UPD, - &length, fetch_lid_data_complete); - return; + rc = fsp_fetch_data_queue(flags, id, T_COM_MARKER_LID_ID, + 0, (void *)PSI_DMA_CODE_UPD, + &length, fetch_lid_data_complete); + + /* If queue msg fails, then continue with marker LID + * validation hoping that we have at least boot side + * information. + */ + if (rc == OPAL_SUCCESS) + return; } lock(&flash_lock); |