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 <zbigniew.bodek@huawei.com>
Change-Id: I55701f0650c88bd083c062581af5c7a1b966bc0b
This commit is contained in:
Zbigniew Bodek 2020-10-27 01:11:36 +08:00
parent 3247d4f651
commit 994ad00de7
1 changed files with 7 additions and 7 deletions

View File

@ -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)