Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch: rearrange headers inclusion order in asm/bitops for m68k, sh and h8300

m68k and sh include bitmap/{find,le}.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.

[yury.norov@gmail.com: h8300: rearrange headers inclusion order in asm/bitops]
Link: https://lkml.kernel.org/r/20210406183625.794227-1-yury.norov@gmail.com

Link: https://lkml.kernel.org/r/20210401003153.97325-5-yury.norov@gmail.com
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Cc: Alexey Klimov <aklimov@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Sterba <dsterba@suse.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Jianpeng Ma <jianpeng.ma@intel.com>
Cc: Joe Perches <joe@perches.com>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Stefano Brivio <sbrivio@redhat.com>
Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Yoshinori Sato <ysato@users.osdn.me>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Yury Norov and committed by
Linus Torvalds
bb8bc36e a719101f

+10 -9
+4 -4
arch/h8300/include/asm/bitops.h
··· 9 9 10 10 #include <linux/compiler.h> 11 11 12 + #include <asm-generic/bitops/fls.h> 13 + #include <asm-generic/bitops/__fls.h> 14 + #include <asm-generic/bitops/fls64.h> 15 + 12 16 #ifdef __KERNEL__ 13 17 14 18 #ifndef _LINUX_BITOPS_H ··· 176 172 #include <asm-generic/bitops/ext2-atomic.h> 177 173 178 174 #endif /* __KERNEL__ */ 179 - 180 - #include <asm-generic/bitops/fls.h> 181 - #include <asm-generic/bitops/__fls.h> 182 - #include <asm-generic/bitops/fls64.h> 183 175 184 176 #endif /* _H8300_BITOPS_H */
+3 -3
arch/m68k/include/asm/bitops.h
··· 440 440 441 441 #endif 442 442 443 - #include <asm-generic/bitops/find.h> 444 - 445 443 #ifdef __KERNEL__ 446 444 447 445 #if defined(CONFIG_CPU_HAS_NO_BITFIELDS) ··· 523 525 #define __clear_bit_unlock clear_bit_unlock 524 526 525 527 #include <asm-generic/bitops/ext2-atomic.h> 526 - #include <asm-generic/bitops/le.h> 527 528 #include <asm-generic/bitops/fls64.h> 528 529 #include <asm-generic/bitops/sched.h> 529 530 #include <asm-generic/bitops/hweight.h> 531 + #include <asm-generic/bitops/le.h> 530 532 #endif /* __KERNEL__ */ 533 + 534 + #include <asm-generic/bitops/find.h> 531 535 532 536 #endif /* _M68K_BITOPS_H */
+3 -2
arch/sh/include/asm/bitops.h
··· 58 58 return result; 59 59 } 60 60 61 - #include <asm-generic/bitops/find.h> 62 61 #include <asm-generic/bitops/ffs.h> 63 62 #include <asm-generic/bitops/hweight.h> 64 63 #include <asm-generic/bitops/lock.h> 65 64 #include <asm-generic/bitops/sched.h> 66 - #include <asm-generic/bitops/le.h> 67 65 #include <asm-generic/bitops/ext2-atomic.h> 68 66 #include <asm-generic/bitops/fls.h> 69 67 #include <asm-generic/bitops/__fls.h> 70 68 #include <asm-generic/bitops/fls64.h> 69 + 70 + #include <asm-generic/bitops/le.h> 71 + #include <asm-generic/bitops/find.h> 71 72 72 73 #endif /* __ASM_SH_BITOPS_H */