global change: fix tools/checkpatch.sh warnnings

Change-Id: I88cfa979c44bcaf3a8f6e036c6bfccd3402ca85a
Signed-off-by: ligd <liguiding@fishsemi.com>
This commit is contained in:
ligd
2020-04-09 20:46:24 +08:00
committed by patacongo
parent 231ad202ee
commit cbf31bca5c
25 changed files with 188 additions and 124 deletions
+4 -2
View File
@@ -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;
}
+2 -1
View File
@@ -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
View File
@@ -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