[PATCH 1/5] lmb: remove lmb_is_nomap() from include
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Sun Nov 14 10:03:10 CET 2021
Defining static functions in includes should be avoided.
Function lmb_is_nomap() is only used in the unit test.
So move it to the unit test.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
include/lmb.h | 7 -------
test/lib/lmb.c | 5 +++++
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/lmb.h b/include/lmb.h
index 1984291132..ee5b938e19 100644
--- a/include/lmb.h
+++ b/include/lmb.h
@@ -124,13 +124,6 @@ void board_lmb_reserve(struct lmb *lmb);
void arch_lmb_reserve(struct lmb *lmb);
void arch_lmb_reserve_generic(struct lmb *lmb, ulong sp, ulong end, ulong align);
-/* Low level functions */
-
-static inline bool lmb_is_nomap(struct lmb_property *m)
-{
- return m->flags & LMB_NOMAP;
-}
-
#endif /* __KERNEL__ */
#endif /* _LINUX_LMB_H */
diff --git a/test/lib/lmb.c b/test/lib/lmb.c
index b2c2b99ef1..157c26394d 100644
--- a/test/lib/lmb.c
+++ b/test/lib/lmb.c
@@ -12,6 +12,11 @@
#include <test/test.h>
#include <test/ut.h>
+static inline bool lmb_is_nomap(struct lmb_property *m)
+{
+ return m->flags & LMB_NOMAP;
+}
+
static int check_lmb(struct unit_test_state *uts, struct lmb *lmb,
phys_addr_t ram_base, phys_size_t ram_size,
unsigned long num_reserved,
--
2.32.0
More information about the U-Boot
mailing list