mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
HV: Bracket for the same level of precendence
The plus and minor have the same level of precedence. The Misra-C considers it as a violation. Added brackets in between addition and substraction oprators. Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -210,7 +210,8 @@
|
||||
#define MMU_MEM_ATTR_TYPE_MASK \
|
||||
(IA32E_PDPTE_PAT_BIT | IA32E_COMM_PCD_BIT | IA32E_COMM_PWT_BIT)
|
||||
|
||||
#define ROUND_PAGE_UP(addr) (((addr) + (uint64_t)CPU_PAGE_SIZE - 1UL) & CPU_PAGE_MASK)
|
||||
#define ROUND_PAGE_UP(addr) \
|
||||
((((addr) + (uint64_t)CPU_PAGE_SIZE) - 1UL) & CPU_PAGE_MASK)
|
||||
#define ROUND_PAGE_DOWN(addr) ((addr) & CPU_PAGE_MASK)
|
||||
|
||||
enum _page_table_type {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#define offsetof(st, m) __builtin_offsetof(st, m)
|
||||
|
||||
/** Roundup (x/y) to ( x/y + (x%y) ? 1 : 0) **/
|
||||
#define INT_DIV_ROUNDUP(x, y) (((x)+(y)-1)/(y))
|
||||
#define INT_DIV_ROUNDUP(x, y) ((((x)+(y))-1)/(y))
|
||||
|
||||
#define min(x, y) ((x) < (y)) ? (x) : (y)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user