mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-06 16:15:00 +00:00
hv: treewide: fix 'Expression is not Boolean'
MISRA-C requires that the controlling expression of an if statement or an iteration-statement shall be Boolean type. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -22,7 +22,7 @@ static void kick_notification(__unused uint32_t irq, __unused void *data)
|
||||
struct smp_call_info_data *smp_call =
|
||||
&per_cpu(smp_call_info, pcpu_id);
|
||||
|
||||
if (smp_call->func)
|
||||
if (smp_call->func != NULL)
|
||||
smp_call->func(smp_call->data);
|
||||
bitmap_clear_nolock(pcpu_id, &smp_call_mask);
|
||||
}
|
||||
@@ -34,7 +34,8 @@ void smp_call_function(uint64_t mask, smp_call_func_t func, void *data)
|
||||
struct smp_call_info_data *smp_call;
|
||||
|
||||
/* wait for previous smp call complete, which may run on other cpus */
|
||||
while (atomic_cmpxchg64(&smp_call_mask, 0UL, mask & INVALID_BIT_INDEX));
|
||||
while (atomic_cmpxchg64(&smp_call_mask, 0UL, mask & INVALID_BIT_INDEX)
|
||||
!= 0UL);
|
||||
pcpu_id = ffs64(mask);
|
||||
while (pcpu_id != INVALID_BIT_INDEX) {
|
||||
bitmap_clear_nolock(pcpu_id, &mask);
|
||||
|
||||
Reference in New Issue
Block a user