summaryrefslogtreecommitdiffstats
path: root/hw/phb4.c
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2017-11-09 11:44:11 +1100
committerStewart Smith <stewart@linux.ibm.com>2018-08-06 03:00:59 -0500
commit0d96d56298d5a918f60babbf5ae26a8a74e8183d (patch)
tree644aa62766035c6840cb6ec2c4c15e3b27ce8abf /hw/phb4.c
parent1c62f56b33511f4208ae289afb68f3d1f24f3924 (diff)
downloadtalos-skiboot-0d96d56298d5a918f60babbf5ae26a8a74e8183d.tar.gz
talos-skiboot-0d96d56298d5a918f60babbf5ae26a8a74e8183d.zip
phb4: Use the return value of phb4_fenced() in phb4_get_diag_data()
phb4_get_diag_data() checks the flags for the PHB4_AIB_FENCED after having called phb4_fenced(). This information is returned by phb4_fenced(). This patch was prompted by an unused return value warning in Coverity. Fixes: CID 163734 Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/phb4.c')
-rw-r--r--hw/phb4.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/phb4.c b/hw/phb4.c
index 4b1acd9e..5e07e2bc 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -3755,6 +3755,7 @@ static int64_t phb4_get_diag_data(struct phb *phb,
void *diag_buffer,
uint64_t diag_buffer_len)
{
+ bool fenced;
struct phb4 *p = phb_to_phb4(phb);
struct OpalIoPhb4ErrorData *data = diag_buffer;
@@ -3767,10 +3768,10 @@ static int64_t phb4_get_diag_data(struct phb *phb,
* Dummy check for fence so that phb4_read_phb_status knows
* whether to use ASB or AIB
*/
- phb4_fenced(p);
+ fenced = phb4_fenced(p);
phb4_read_phb_status(p, data);
- if (!(p->flags & PHB4_AIB_FENCED))
+ if (!fenced)
phb4_eeh_dump_regs(p);
/*
OpenPOWER on IntegriCloud