You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ar...@apache.org on 2024/03/11 05:12:40 UTC
(nuttx) branch master updated: mm/kconfig: fix typo in MM_DEFAULT_ALIGNMENT
This is an automated email from the ASF dual-hosted git repository.
archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 5ac401d941 mm/kconfig: fix typo in MM_DEFAULT_ALIGNMENT
5ac401d941 is described below
commit 5ac401d941da22109be4de2ec28a77b86b790144
Author: Yanfeng Liu <yf...@qq.com>
AuthorDate: Mon Mar 11 09:48:47 2024 +0800
mm/kconfig: fix typo in MM_DEFAULT_ALIGNMENT
This fixes minor typo in MM_DEFAULT_ALIGNMENT
Signed-off-by: Yanfeng Liu <yf...@qq.com>
---
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)