diff mbox series

[1/8] arm: align find_bit declarations with generic kernel

Message ID 20220701125430.2907638-2-yury.norov@gmail.com (mailing list archive)
State New, archived
Headers show
Series lib: cleanup bitmap-related headers | expand

Commit Message

Yury Norov July 1, 2022, 12:54 p.m. UTC
ARM has their own implementation for find_bit functions, and function
declarations are different with those in generic headers. Fix it.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
---
 arch/arm/include/asm/bitops.h | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

Comments

Andy Shevchenko July 2, 2022, 11:55 a.m. UTC | #1
On Fri, Jul 01, 2022 at 05:54:23AM -0700, Yury Norov wrote:
> ARM has their own implementation for find_bit functions, and function
> declarations are different with those in generic headers. Fix it.

...

> -extern int _find_first_zero_bit_le(const unsigned long *p, unsigned size);
> -extern int _find_next_zero_bit_le(const unsigned long *p, int size, int offset);
> -extern int _find_first_bit_le(const unsigned long *p, unsigned size);
> -extern int _find_next_bit_le(const unsigned long *p, int size, int offset);
> +unsigned long  _find_first_zero_bit_le(const unsigned long *p, unsigned long size);
> +unsigned long  _find_next_zero_bit_le(const unsigned long *p,
> +					unsigned long size, unsigned long offset);
> +unsigned long  _find_first_bit_le(const unsigned long *p, unsigned long size);

> +unsigned long  _find_next_bit_le(const unsigned long *p,
> +					unsigned long size, unsigned long offset);

Indentation seems broken.

Also for all: is double space required?


...

> +unsigned long _find_next_bit_be(const unsigned long *p,
> +					unsigned long size, unsigned long offset);

Indentation of the second line is broken (u in 'unsigned' should be in the same
column as 'const').
diff mbox series

Patch

diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
index 8e94fe7ab5eb..a83c1d9abbed 100644
--- a/arch/arm/include/asm/bitops.h
+++ b/arch/arm/include/asm/bitops.h
@@ -160,18 +160,22 @@  extern int _test_and_change_bit(int nr, volatile unsigned long * p);
 /*
  * Little endian assembly bitops.  nr = 0 -> byte 0 bit 0.
  */
-extern int _find_first_zero_bit_le(const unsigned long *p, unsigned size);
-extern int _find_next_zero_bit_le(const unsigned long *p, int size, int offset);
-extern int _find_first_bit_le(const unsigned long *p, unsigned size);
-extern int _find_next_bit_le(const unsigned long *p, int size, int offset);
+unsigned long  _find_first_zero_bit_le(const unsigned long *p, unsigned long size);
+unsigned long  _find_next_zero_bit_le(const unsigned long *p,
+					unsigned long size, unsigned long offset);
+unsigned long  _find_first_bit_le(const unsigned long *p, unsigned long size);
+unsigned long  _find_next_bit_le(const unsigned long *p,
+					unsigned long size, unsigned long offset);
 
 /*
  * Big endian assembly bitops.  nr = 0 -> byte 3 bit 0.
  */
-extern int _find_first_zero_bit_be(const unsigned long *p, unsigned size);
-extern int _find_next_zero_bit_be(const unsigned long *p, int size, int offset);
-extern int _find_first_bit_be(const unsigned long *p, unsigned size);
-extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
+unsigned long _find_first_zero_bit_be(const unsigned long *p, unsigned long size);
+unsigned long _find_next_zero_bit_be(const unsigned long *p,
+					unsigned long size, unsigned long offset);
+unsigned long _find_first_bit_be(const unsigned long *p, unsigned long size);
+unsigned long _find_next_bit_be(const unsigned long *p,
+					unsigned long size, unsigned long offset);
 
 #ifndef CONFIG_SMP
 /*