diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2018-11-29 15:28:30 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-12-10 22:21:12 -0600 |
commit | 95f587417cd94c592e34e7569e22e4a0c1691915 (patch) | |
tree | fa19174e13e59f902481b08371309441038141ae /core | |
parent | 0714735f0b8513dad808650291f377bd617d5951 (diff) | |
download | talos-skiboot-95f587417cd94c592e34e7569e22e4a0c1691915.tar.gz talos-skiboot-95f587417cd94c592e34e7569e22e4a0c1691915.zip |
opal_sync_host_reboot: clarify when we return OPAL_BUSY_EVENT
Basically to shut up static analysis of using a boolean in a non-boolean
context (bitwise).
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/opal.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/opal.c b/core/opal.c index ba30c309..46035e83 100644 --- a/core/opal.c +++ b/core/opal.c @@ -704,14 +704,12 @@ void opal_del_host_sync_notifier(bool (*notify)(void *data)) static int64_t opal_sync_host_reboot(void) { struct opal_sync_entry *ent, *nxt; - bool ret = true; + int ret = OPAL_SUCCESS; list_for_each_safe(&opal_syncers, ent, nxt, link) - ret &= ent->notify(ent->data); + if (! ent->notify(ent->data)) + ret = OPAL_BUSY_EVENT; - if (ret) - return OPAL_SUCCESS; - else - return OPAL_BUSY_EVENT; + return ret; } opal_call(OPAL_SYNC_HOST_REBOOT, opal_sync_host_reboot, 0); |