mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-04-29 04:04:05 +00:00
HV: treewide: fix violations of coding guideline C-ST-02
The coding guideline rule C-ST-02 requires that 'the loop body shall be enclosed with brackets', or more specifically, braces. This patch adds braces to the single-line loop bodies. This patch has no semantic change. 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:
parent
ff891b4f79
commit
b0dbc1cbfe
@ -93,8 +93,9 @@ static uint32_t get_drhd_dev_scope_cnt(struct acpi_dmar_hardware_unit *drhd)
|
|||||||
while (start < end) {
|
while (start < end) {
|
||||||
scope = (struct acpi_dmar_device_scope *)start;
|
scope = (struct acpi_dmar_device_scope *)start;
|
||||||
if ((scope->entry_type != ACPI_DMAR_SCOPE_TYPE_NOT_USED) &&
|
if ((scope->entry_type != ACPI_DMAR_SCOPE_TYPE_NOT_USED) &&
|
||||||
(scope->entry_type < ACPI_DMAR_SCOPE_TYPE_RESERVED))
|
(scope->entry_type < ACPI_DMAR_SCOPE_TYPE_RESERVED)) {
|
||||||
count++;
|
count++;
|
||||||
|
}
|
||||||
start += scope->length;
|
start += scope->length;
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
@ -140,8 +141,9 @@ static int32_t handle_one_drhd(struct acpi_dmar_hardware_unit *acpi_drhd, struct
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (consumed <= 0)
|
if (consumed <= 0) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
remaining -= consumed;
|
remaining -= consumed;
|
||||||
/* skip IOAPIC & HPET */
|
/* skip IOAPIC & HPET */
|
||||||
|
@ -130,8 +130,9 @@ int32_t add_vmsix_capability(struct pci_vdev *vdev, uint32_t entry_num, uint8_t
|
|||||||
vdev->msix.table_count = entry_num;
|
vdev->msix.table_count = entry_num;
|
||||||
|
|
||||||
/* set mask bit of vector control register */
|
/* set mask bit of vector control register */
|
||||||
for (i = 0; i < entry_num; i++)
|
for (i = 0; i < entry_num; i++) {
|
||||||
vdev->msix.table_entries[i].vector_control |= PCIM_MSIX_VCTRL_MASK;
|
vdev->msix.table_entries[i].vector_control |= PCIM_MSIX_VCTRL_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
(void)memset(&msixcap, 0U, sizeof(struct msixcap));
|
(void)memset(&msixcap, 0U, sizeof(struct msixcap));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user