mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
global change: fix tools/checkpatch.sh warnnings
Change-Id: I88cfa979c44bcaf3a8f6e036c6bfccd3402ca85a Signed-off-by: ligd <liguiding@fishsemi.com>
This commit is contained in:
@@ -151,7 +151,8 @@ void mm_free(FAR struct mm_heap_s *heap, FAR void *mem)
|
||||
* index past the tail chunk because it is always allocated.
|
||||
*/
|
||||
|
||||
andbeyond = (FAR struct mm_allocnode_s *)((FAR char *)next + next->size);
|
||||
andbeyond = (FAR struct mm_allocnode_s *)
|
||||
((FAR char *)next + next->size);
|
||||
|
||||
/* Remove the next node. There must be a predecessor,
|
||||
* but there may not be a successor node.
|
||||
@@ -167,7 +168,8 @@ void mm_free(FAR struct mm_heap_s *heap, FAR void *mem)
|
||||
/* Then merge the two chunks */
|
||||
|
||||
node->size += next->size;
|
||||
andbeyond->preceding = node->size | (andbeyond->preceding & MM_ALLOC_BIT);
|
||||
andbeyond->preceding = node->size |
|
||||
(andbeyond->preceding & MM_ALLOC_BIT);
|
||||
next = (FAR struct mm_freenode_s *)andbeyond;
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,8 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
|
||||
{
|
||||
/* Get a pointer to the next node in physical memory */
|
||||
|
||||
next = (FAR struct mm_freenode_s *)(((FAR char *)node) + node->size);
|
||||
next = (FAR struct mm_freenode_s *)
|
||||
(((FAR char *)node) + node->size);
|
||||
|
||||
/* Create the remainder node */
|
||||
|
||||
|
||||
+4
-1
@@ -51,6 +51,10 @@
|
||||
# include <nuttx/irq.h>
|
||||
#endif
|
||||
|
||||
#ifdef MONITOR_MM_SEMAPHORE
|
||||
# include <debug.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@@ -86,7 +90,6 @@
|
||||
/* Define MONITOR_MM_SEMAPHORE to enable semaphore state monitoring */
|
||||
|
||||
#ifdef MONITOR_MM_SEMAPHORE
|
||||
# include <debug.h>
|
||||
# define msemerr _err
|
||||
# define msemwarn _warn
|
||||
# define mseminfo _info
|
||||
|
||||
Reference in New Issue
Block a user