hv: fix Violations touched ACRN Coding Guidelines

fix violations touched below:
1.Cast operation on a constant value
2.signed/unsigned implicity conversion
3.return value unused.

V1->V2:
1.bitmap api will return boolean type, not need to check "!= 0", deleted.
2.The behaves ~(uint32_t)X and (uint32_t)~X are not defined in ACRN hypervisor Coding Guidelines,
removed the change of it.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
huihuang.shi
2019-08-14 16:34:29 +08:00
committed by ACRN System Integration
parent f1b71d983a
commit f147c388a5
12 changed files with 31 additions and 30 deletions

View File

@@ -39,7 +39,7 @@ int32_t validate_pstate(const struct acrn_vm *vm, uint64_t perf_ctl)
max_px_ctl_val = ((px_data[0].control & 0xff00UL) >> 8U);
/* get min px control value, should be for p(px_cnt-1), i.e. LFM. */
min_px_ctl_val = ((px_data[px_cnt - 1].control & 0xff00UL) >> 8U);
min_px_ctl_val = ((px_data[px_cnt - 1U].control & 0xff00UL) >> 8U);
px_target_val = ((perf_ctl & 0xff00UL) >> 8U);
if ((px_target_val <= max_px_ctl_val) && (px_target_val >= min_px_ctl_val)) {