diff options
author | Ananth N Mavinakayanahalli <ananth@in.ibm.com> | 2014-12-09 21:54:37 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-12-10 11:50:33 +1100 |
commit | 261738b521230711aa3d02c0f449114a2eeae5fe (patch) | |
tree | 3875a8bf458aad658689997cabd366d4d5606111 /hw/fsp | |
parent | ca31c21aeb66c30325f927f78b294e967a60e9ac (diff) | |
download | talos-skiboot-261738b521230711aa3d02c0f449114a2eeae5fe.tar.gz talos-skiboot-261738b521230711aa3d02c0f449114a2eeae5fe.zip |
SURV: Fix unused result warnings in surveillance code
Fix Wunused_result
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp')
-rw-r--r-- | hw/fsp/fsp-surveillance.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/hw/fsp/fsp-surveillance.c b/hw/fsp/fsp-surveillance.c index ebe19d63..dab3f310 100644 --- a/hw/fsp/fsp-surveillance.c +++ b/hw/fsp/fsp-surveillance.c @@ -92,6 +92,7 @@ static void fsp_surv_check_timeout(void) static void fsp_surv_hbeat(void) { u64 now = mftb(); + struct fsp_msg *msg; /* Check if an ack is pending... if so, don't send the ping just yet */ if (fsp_surv_ack_pending) { @@ -111,12 +112,19 @@ static void fsp_surv_hbeat(void) (tb_compare(now, surv_timer) == TB_AEQUALB)) { prlog(PR_DEBUG, "SURV: Sending the hearbeat command to FSP\n"); - fsp_queue_msg(fsp_mkmsg(FSP_CMD_SURV_HBEAT, 1, 120), - fsp_surv_ack); - - fsp_surv_ack_pending = true; - surv_timer = now + secs_to_tb(60); - surv_ack_timer = now + secs_to_tb(FSP_SURV_ACK_TIMEOUT); + msg = fsp_mkmsg(FSP_CMD_SURV_HBEAT, 1, 120); + if (!msg) { + prerror("SURV: Failed to allocate hbeat msg\n"); + return; + } + if (fsp_queue_msg(msg, fsp_surv_ack)) { + fsp_freemsg(msg); + prerror("SURV: Failed to queue hbeat msg\n"); + } else { + fsp_surv_ack_pending = true; + surv_timer = now + secs_to_tb(60); + surv_ack_timer = now + secs_to_tb(FSP_SURV_ACK_TIMEOUT); + } } } |