mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-29 20:47:56 +00:00
HV:MM:add 'U/UL' suffix for unsigned contant value
In the current memory module, there are many constatn value without U/UL suffix, it is reported as MISRA C violations by static analysis tool. Add 'U/UL' suffix for unsigned contant value in memory module as needed. Note:In the most case, CPU_PAGE_SIZE(0x1000) is used as unsigned integer contant value, so CPU_PAGE_SIZE is defined as unsigned integer contant value, and it is safety converted into unsigned long type according to MISRA C standard. Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
* NOTE: The required alignment must be a power of 2 (2, 4, 8, 16, 32, etc)
|
||||
*/
|
||||
#define MEM_ALIGNED_CHECK(value, req_align) \
|
||||
(((uint64_t)(value) & ((uint64_t)(req_align) - (uint64_t)1)) == 0)
|
||||
(((uint64_t)(value) & ((uint64_t)(req_align) - 1UL)) == 0UL)
|
||||
|
||||
#if !defined(ASSEMBLER) && !defined(LINKER_SCRIPT)
|
||||
|
||||
|
Reference in New Issue
Block a user