]> xenbits.xensource.com Git - xen.git/commitdiff
xen/bitops: Rearrange the top of xen/bitops.h
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 24 May 2024 19:37:50 +0000 (20:37 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 1 Jun 2024 01:28:14 +0000 (02:28 +0100)
The #include <asm/bitops.h> can move to the top of the file now now that
generic_ffs()/generic_fls() have been untangled.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/include/xen/bitops.h

index d216fead1710031f40e0cca2379b1dfb6da0c649..6a5e28730a257272fe0969afb2db98b300502ab3 100644 (file)
@@ -4,6 +4,8 @@
 #include <xen/compiler.h>
 #include <xen/types.h>
 
+#include <asm/bitops.h>
+
 /*
  * Create a contiguous bitmask starting at bit position @l and ending at
  * position @h. For example GENMASK(30, 21) gives us 0x7fe00000ul.
 unsigned int __pure generic_ffsl(unsigned long x);
 unsigned int __pure generic_flsl(unsigned long x);
 
-/*
- * Include this here because some architectures need generic_ffs/fls in
- * scope
- */
-
-/* --------------------- Please tidy above here --------------------- */
-
-#include <asm/bitops.h>
-
-/*
- * Find First/Last Set bit (all forms).
- *
- * Bits are labelled from 1.  Returns 0 if given 0.
- */
 static always_inline __pure unsigned int ffs(unsigned int x)
 {
     if ( __builtin_constant_p(x) )