mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
HV: treewide: fix violations of coding guideline C-TY-12
The coding guideline rule C-TY-12 requires that 'all type conversions shall be explicit'. Especially implicit cases on the signedness of variables shall be avoided. This patch either adds explicit type casts or adjust local variable types to make sure that Booleans, signed and unsigned integers are not used mixedly. This patch has no semantic changes. Tracked-On: #6776 Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -198,7 +198,7 @@ static int32_t local_gva2gpa_common(struct acrn_vcpu *vcpu, const struct page_wa
|
||||
static int32_t local_gva2gpa_pae(struct acrn_vcpu *vcpu, struct page_walk_info *pw_info,
|
||||
uint64_t gva, uint64_t *gpa, uint32_t *err_code)
|
||||
{
|
||||
int32_t index;
|
||||
uint32_t index;
|
||||
uint64_t *base;
|
||||
uint64_t entry;
|
||||
uint64_t addr;
|
||||
|
@@ -290,7 +290,7 @@ static bool rt_vm_pm1a_io_write(struct acrn_vcpu *vcpu, uint16_t addr, size_t wi
|
||||
if (width != 2U) {
|
||||
pr_dbg("Invalid address (0x%x) or width (0x%x)", addr, width);
|
||||
} else {
|
||||
if ((((v & VIRTUAL_PM1A_SLP_EN) != 0U) && (((v & VIRTUAL_PM1A_SLP_TYP) >> 10U) == 5U)) != 0U) {
|
||||
if (((v & VIRTUAL_PM1A_SLP_EN) != 0U) && (((v & VIRTUAL_PM1A_SLP_TYP) >> 10U) == 5U)) {
|
||||
poweroff_if_rt_vm(vcpu->vm);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user