lmb: remove lmb_is_nomap() from include
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 14 Nov 2021 07:41:07 +0000 (08:41 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 20 Nov 2021 09:53:00 +0000 (10:53 +0100)
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 <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
include/lmb.h
test/lib/lmb.c

index 1984291..ee5b938 100644 (file)
@@ -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 */
index b2c2b99..157c263 100644 (file)
 #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,