mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-28 20:16:09 +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:
@@ -31,10 +31,10 @@
|
||||
#define REQ_STATE_PROCESSING 2
|
||||
#define REQ_STATE_FAILED -1
|
||||
|
||||
#define REQ_PORTIO 0
|
||||
#define REQ_MMIO 1
|
||||
#define REQ_PCICFG 2
|
||||
#define REQ_WP 3
|
||||
#define REQ_PORTIO 0U
|
||||
#define REQ_MMIO 1U
|
||||
#define REQ_PCICFG 2U
|
||||
#define REQ_WP 3U
|
||||
|
||||
#define REQUEST_READ 0
|
||||
#define REQUEST_WRITE 1
|
||||
|
@@ -106,9 +106,9 @@
|
||||
* the parameter for HC_VM_SET_MEMMAP hypercall
|
||||
*/
|
||||
struct vm_set_memmap {
|
||||
#define MAP_MEM 0
|
||||
#define MAP_MMIO 1
|
||||
#define MAP_UNMAP 2
|
||||
#define MAP_MEM 0U
|
||||
#define MAP_MMIO 1U
|
||||
#define MAP_UNMAP 2U
|
||||
/** map type: MAP_MEM, MAP_MMIO or MAP_UNMAP */
|
||||
uint32_t type;
|
||||
|
||||
|
Reference in New Issue
Block a user