mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-26 19:24:17 +00:00
HV: treewide: fix violations of coding guideline C-TY-27 & C-TY-28
The coding guideline rules C-TY-27 and C-TY-28, combined, requires that assignment and arithmetic operations shall be applied only on operands of the same kind. This patch either adds explicit type casts or adjust types of variables to align the types of operands. The only semantic change introduced by this patch is the promotion of the second argument of set_vmcs_bit() and clear_vmcs_bit() to uint64_t (formerly uint32_t). This avoids clear_vmcs_bit() to accidentally clears the upper 32 bits of the requested VMCS field. Other than that, this patch has no semantic change. Specifically this patch is not meant to fix buggy narrowing operations, only to make these operations explicit. 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:
@@ -114,7 +114,7 @@ static void create_vf(struct pci_vdev *pf_vdev, union pci_bdf vf_bdf, uint16_t v
|
||||
pr_err("PF %x:%x.%x can't creat VF, unset VF_ENABLE",
|
||||
pf_vdev->bdf.bits.b, pf_vdev->bdf.bits.d, pf_vdev->bdf.bits.f);
|
||||
} else {
|
||||
uint16_t bar_idx;
|
||||
uint32_t bar_idx;
|
||||
struct pci_vbar *vf_vbar;
|
||||
|
||||
/* VF bars information from its PF SRIOV capability, no need to access physical device */
|
||||
|
Reference in New Issue
Block a user