Skip to content
Permalink
Browse files
arch: rearrange headers inclusion order in asm/bitops for m68k and sh
m68k and sh include bitmap/find.h prior to ffs/fls headers. New fast-path
implementation in find.h requires ffs/fls. Reordering the headers inclusion
sequence helps to prevent compile-time implicit-function-declaration error.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
  • Loading branch information
YuryNorov committed Mar 9, 2021
1 parent 1783205 commit 348322cc21fc99c95d3a048a92e8519db5e9a692
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
@@ -440,8 +440,6 @@ static inline unsigned long ffz(unsigned long word)

#endif

#include <asm-generic/bitops/find.h>

#ifdef __KERNEL__

#if defined(CONFIG_CPU_HAS_NO_BITFIELDS)
@@ -531,4 +529,6 @@ static inline int __fls(int x)
#include <asm-generic/bitops/hweight.h>
#endif /* __KERNEL__ */

#include <asm-generic/bitops/find.h>

#endif /* _M68K_BITOPS_H */
@@ -58,7 +58,6 @@ static inline unsigned long __ffs(unsigned long word)
return result;
}

#include <asm-generic/bitops/find.h>
#include <asm-generic/bitops/ffs.h>
#include <asm-generic/bitops/hweight.h>
#include <asm-generic/bitops/lock.h>
@@ -69,4 +68,6 @@ static inline unsigned long __ffs(unsigned long word)
#include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/fls64.h>

#include <asm-generic/bitops/find.h>

#endif /* __ASM_SH_BITOPS_H */

0 comments on commit 348322c

Please sign in to comment.