mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-12-16 01:42:39 +00:00
HV: logical and high level precedence expression needs brackets
Added brackets for expression to make it easy to understand and reduce the mistake of precedence. The rule is applied to the mixed same level of prevedence opeartors, high level presedence operators and logical expression. Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -51,7 +51,7 @@ extern uint32_t tsc_khz;
|
||||
|
||||
static inline uint64_t us_to_ticks(uint32_t us)
|
||||
{
|
||||
return ((uint64_t)us * (uint64_t)tsc_khz / 1000UL);
|
||||
return (((uint64_t)us * (uint64_t)tsc_khz) / 1000UL);
|
||||
}
|
||||
|
||||
#define CYCLES_PER_MS us_to_ticks(1000U)
|
||||
|
||||
Reference in New Issue
Block a user