hv: fix 'Expression is not Boolean'

MISRA-C requires that the controlling expression of an if statement or
an iteration-statement shall be Boolean type.

v1 -> v2:
* update the U suffix of constant to let the type of operands
  to bit operations (&) is the same.
* update the type of 'i' from uint64_t to uint16_t in
  'profiling_set_control' since it is limited by phys_cpu_num,
  which is uint16_t.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shiqing Gao
2018-11-07 14:14:49 +08:00
committed by wenlingz
parent 121454c4bd
commit b430b00a08
14 changed files with 33 additions and 33 deletions

View File

@@ -142,7 +142,7 @@ bool abl_seed_parse(struct acrn_vm *vm, char *cmdline, char *out_arg, uint32_t o
(void)memset((void *)arg, ' ', len);
/* Convert the param_addr to SOS GPA and copy to caller */
if (out_arg) {
if (out_arg != NULL) {
snprintf(out_arg, out_len, "%s0x%X ",
dev_sec_info_arg, hva2gpa(vm, param_addr));
}

View File

@@ -179,7 +179,7 @@ bool sbl_seed_parse(struct acrn_vm *vm, char *cmdline, char *out_arg, uint32_t o
(void)memset((void *)arg, ' ', len);
/* Convert the param_addr to SOS GPA and copy to caller */
if (out_arg) {
if (out_arg != NULL) {
snprintf(out_arg, out_len, "%s0x%X ",
boot_params_arg, hva2gpa(vm, param_addr));
}