HV: treewide: fix violations of coding guideline C-PP-04

The coding guideline rule C-PP-04 requires that 'parentheses shall be used
when referencing a MACRO parameter'. This patch adds parentheses to macro
parameters or expressions that are not yet wrapped properly.

This patch has no sematic impact.

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:
Junjie Mao
2021-10-29 10:54:41 +08:00
committed by wenlingz
parent d5c137eac5
commit ff891b4f79
5 changed files with 8 additions and 8 deletions

View File

@@ -142,7 +142,7 @@
for ((idx) = 0U, (vcpu) = &((vm)->hw.vcpu_array[(idx)]); \
(idx) < (vm)->hw.created_vcpus; \
(idx)++, (vcpu) = &((vm)->hw.vcpu_array[(idx)])) \
if (vcpu->state != VCPU_OFFLINE)
if ((vcpu)->state != VCPU_OFFLINE)
enum vcpu_state {
VCPU_OFFLINE = 0U,

View File

@@ -8,7 +8,7 @@
#define VMCS_H_
#define VM_SUCCESS 0
#define VM_FAIL -1
#define VM_FAIL (-1)
#ifndef ASSEMBLER
#include <types.h>

View File

@@ -481,7 +481,7 @@ static inline uint16_t dma_frcd_up_sid(uint64_t up_sid)
#define DRHD_FLAG_INCLUDE_PCI_ALL_MASK (1U)
#define DEVFUN(dev, fun) (((dev & 0x1FU) << 3U) | ((fun & 0x7U)))
#define DEVFUN(dev, fun) ((((dev) & 0x1FU) << 3U) | (((fun) & 0x7U)))
struct dmar_dev_scope {
enum acpi_dmar_scope_type type;