linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] h8300: rearrange headers inclusion order in asm/bitops
@ 2021-04-06 18:36 Yury Norov
  0 siblings, 0 replies; 2+ messages in thread
From: Yury Norov @ 2021-04-06 18:36 UTC (permalink / raw)
  To: Yoshinori Sato, linux-kernel, linux-arch, uclinux-h8-devel,
	Andrew Morton, Andy Shevchenko, Arnd Bergmann, Rasmus Villemoes,
	Guenter Roeck
  Cc: Yury Norov, kernel test robot

The commit a5145bdad3ff ("arch: rearrange headers inclusion order in
asm/bitops for m68k and sh") on next-20210401 fixed header ordering issue.
h8300 has similar problem, which was overlooked by me.

h8300 includes 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.

v2: change wording in the comment.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
---
 arch/h8300/include/asm/bitops.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/h8300/include/asm/bitops.h b/arch/h8300/include/asm/bitops.h
index 7aa16c732aa9..c867a80cab5b 100644
--- a/arch/h8300/include/asm/bitops.h
+++ b/arch/h8300/include/asm/bitops.h
@@ -9,6 +9,10 @@
 
 #include <linux/compiler.h>
 
+#include <asm-generic/bitops/fls.h>
+#include <asm-generic/bitops/__fls.h>
+#include <asm-generic/bitops/fls64.h>
+
 #ifdef __KERNEL__
 
 #ifndef _LINUX_BITOPS_H
@@ -173,8 +177,4 @@ static inline unsigned long __ffs(unsigned long word)
 
 #endif /* __KERNEL__ */
 
-#include <asm-generic/bitops/fls.h>
-#include <asm-generic/bitops/__fls.h>
-#include <asm-generic/bitops/fls64.h>
-
 #endif /* _H8300_BITOPS_H */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] h8300: rearrange headers inclusion order in asm/bitops
@ 2021-04-06 21:47 Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-04-06 21:47 UTC (permalink / raw)
  To: Yury Norov
  Cc: Yoshinori Sato, linux-kernel, linux-arch, uclinux-h8-devel,
	Andrew Morton, Andy Shevchenko, Arnd Bergmann, Rasmus Villemoes,
	kernel test robot

On Tue, Apr 06, 2021 at 11:36:25AM -0700, Yury Norov wrote:
> The commit a5145bdad3ff ("arch: rearrange headers inclusion order in
> asm/bitops for m68k and sh") on next-20210401 fixed header ordering issue.
> h8300 has similar problem, which was overlooked by me.
> 
> h8300 includes 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.
> 
> v2: change wording in the comment.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Yury Norov <yury.norov@gmail.com>

Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> ---
>  arch/h8300/include/asm/bitops.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/h8300/include/asm/bitops.h b/arch/h8300/include/asm/bitops.h
> index 7aa16c732aa9..c867a80cab5b 100644
> --- a/arch/h8300/include/asm/bitops.h
> +++ b/arch/h8300/include/asm/bitops.h
> @@ -9,6 +9,10 @@
>  
>  #include <linux/compiler.h>
>  
> +#include <asm-generic/bitops/fls.h>
> +#include <asm-generic/bitops/__fls.h>
> +#include <asm-generic/bitops/fls64.h>
> +
>  #ifdef __KERNEL__
>  
>  #ifndef _LINUX_BITOPS_H
> @@ -173,8 +177,4 @@ static inline unsigned long __ffs(unsigned long word)
>  
>  #endif /* __KERNEL__ */
>  
> -#include <asm-generic/bitops/fls.h>
> -#include <asm-generic/bitops/__fls.h>
> -#include <asm-generic/bitops/fls64.h>
> -
>  #endif /* _H8300_BITOPS_H */
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-06 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 18:36 [PATCH v2] h8300: rearrange headers inclusion order in asm/bitops Yury Norov
2021-04-06 21:47 Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).