From 5ac401d941da22109be4de2ec28a77b86b790144 Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Mon, 11 Mar 2024 09:48:47 +0800 Subject: [PATCH] mm/kconfig: fix typo in MM_DEFAULT_ALIGNMENT This fixes minor typo in MM_DEFAULT_ALIGNMENT Signed-off-by: Yanfeng Liu --- include/nuttx/mm/mempool.h | 4 ++-- mm/Kconfig | 2 +- mm/mm_heap/mm.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/nuttx/mm/mempool.h b/include/nuttx/mm/mempool.h index 4a7c48ddc7..a46eaa091c 100644 --- a/include/nuttx/mm/mempool.h +++ b/include/nuttx/mm/mempool.h @@ -38,10 +38,10 @@ * Pre-processor Definitions ****************************************************************************/ -#if CONFIG_MM_DFAULT_ALIGNMENT == 0 +#if CONFIG_MM_DEFAULT_ALIGNMENT == 0 # define MEMPOOL_ALIGN (2 * sizeof(uintptr_t)) #else -# define MEMPOOL_ALIGN CONFIG_MM_DFAULT_ALIGNMENT +# define MEMPOOL_ALIGN CONFIG_MM_DEFAULT_ALIGNMENT #endif #if CONFIG_MM_BACKTRACE >= 0 diff --git a/mm/Kconfig b/mm/Kconfig index 0f5fa84520..f53501cff3 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -60,7 +60,7 @@ config MM_KERNEL_HEAPSIZE user-mode heap. This value may need to be aligned to units of the size of the smallest memory protection region. -config MM_DFAULT_ALIGNMENT +config MM_DEFAULT_ALIGNMENT int "Memory default alignment in bytes" default 0 range 0 64 diff --git a/mm/mm_heap/mm.h b/mm/mm_heap/mm.h index 2df5fe6528..67965686be 100644 --- a/mm/mm_heap/mm.h +++ b/mm/mm_heap/mm.h @@ -112,10 +112,10 @@ #define MM_MAX_CHUNK (1 << MM_MAX_SHIFT) #define MM_NNODES (MM_MAX_SHIFT - MM_MIN_SHIFT + 1) -#if CONFIG_MM_DFAULT_ALIGNMENT == 0 +#if CONFIG_MM_DEFAULT_ALIGNMENT == 0 # define MM_ALIGN (2 * sizeof(uintptr_t)) #else -# define MM_ALIGN CONFIG_MM_DFAULT_ALIGNMENT +# define MM_ALIGN CONFIG_MM_DEFAULT_ALIGNMENT #endif #define MM_GRAN_MASK (MM_ALIGN - 1) #define MM_ALIGN_UP(a) (((a) + MM_GRAN_MASK) & ~MM_GRAN_MASK)