From 994ad00de78eacdb4d978eb9f014528133be8416 Mon Sep 17 00:00:00 2001 From: Zbigniew Bodek Date: Tue, 27 Oct 2020 01:11:36 +0800 Subject: [PATCH] Change DEFINE macro to U32_C The macro to append "U" suffix should be named according to what it actually does which is defining U32 constant. Signed-off-by: Zbigniew Bodek Change-Id: I55701f0650c88bd083c062581af5c7a1b966bc0b --- kernel/base/include/los_vm_zone.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/base/include/los_vm_zone.h b/kernel/base/include/los_vm_zone.h index 0292effd..0baba0a2 100644 --- a/kernel/base/include/los_vm_zone.h +++ b/kernel/base/include/los_vm_zone.h @@ -40,11 +40,11 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ -#define DEFINE_(X) X##U -#define DEFINE(X) DEFINE_(X) +#define _U32_C(X) X##U +#define U32_C(X) _U32_C(X) -#define KERNEL_VMM_BASE DEFINE(KERNEL_VADDR_BASE) -#define KERNEL_VMM_SIZE DEFINE(KERNEL_VADDR_SIZE) +#define KERNEL_VMM_BASE U32_C(KERNEL_VADDR_BASE) +#define KERNEL_VMM_SIZE U32_C(KERNEL_VADDR_SIZE) #define KERNEL_ASPACE_BASE KERNEL_VMM_BASE #define KERNEL_ASPACE_SIZE KERNEL_VMM_SIZE @@ -57,11 +57,11 @@ extern "C" { #define VMALLOC_SIZE 0x08000000 #define PERIPH_DEVICE_BASE (VMALLOC_START + VMALLOC_SIZE) -#define PERIPH_DEVICE_SIZE PERIPH_PMM_SIZE +#define PERIPH_DEVICE_SIZE U32_C(PERIPH_PMM_SIZE) #define PERIPH_CACHED_BASE (PERIPH_DEVICE_BASE + PERIPH_DEVICE_SIZE) -#define PERIPH_CACHED_SIZE PERIPH_PMM_SIZE +#define PERIPH_CACHED_SIZE U32_C(PERIPH_PMM_SIZE) #define PERIPH_UNCACHED_BASE (PERIPH_CACHED_BASE + PERIPH_CACHED_SIZE) -#define PERIPH_UNCACHED_SIZE PERIPH_PMM_SIZE +#define PERIPH_UNCACHED_SIZE U32_C(PERIPH_PMM_SIZE) #define IO_DEVICE_ADDR(paddr) (paddr - PERIPH_PMM_BASE + PERIPH_DEVICE_BASE) #define IO_CACHED_ADDR(paddr) (paddr - PERIPH_PMM_BASE + PERIPH_CACHED_BASE)