Skip to content

Commit e13b91c

Browse files
committed
unicore32: fix build error for find bitops
Remove the __uc32_ prefix in find bitops functions. Move find_* macros behind asm-generic/bitops.h inclusion. see commit <19de85ef574c3a2182e3ccad9581805052f14946> bitops: add #ifndef for each of find bitops also see commit <63e424c84429903c92a0f1e9654c31ccaf6694d0> arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT} Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de>
1 parent 7f80850 commit e13b91c

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

‎arch/unicore32/include/asm/bitops.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
#ifndef __UNICORE_BITOPS_H__
1414
#define __UNICORE_BITOPS_H__
1515

16-
#define find_next_bit __uc32_find_next_bit
17-
#define find_next_zero_bit __uc32_find_next_zero_bit
18-
19-
#define find_first_bit __uc32_find_first_bit
20-
#define find_first_zero_bit __uc32_find_first_zero_bit
21-
2216
#define _ASM_GENERIC_BITOPS_FLS_H_
2317
#define _ASM_GENERIC_BITOPS___FLS_H_
2418
#define _ASM_GENERIC_BITOPS_FFS_H_
@@ -44,4 +38,10 @@ static inline int fls(int x)
4438

4539
#include <asm-generic/bitops.h>
4640

41+
/* following definitions: to avoid using codes in lib/find_*.c */
42+
#define find_next_bit find_next_bit
43+
#define find_next_zero_bit find_next_zero_bit
44+
#define find_first_bit find_first_bit
45+
#define find_first_zero_bit find_first_zero_bit
46+
4747
#endif /* __UNICORE_BITOPS_H__ */

‎arch/unicore32/kernel/ksyms.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
#include "ksyms.h"
2626

27-
EXPORT_SYMBOL(__uc32_find_next_zero_bit);
28-
EXPORT_SYMBOL(__uc32_find_next_bit);
27+
EXPORT_SYMBOL(find_next_zero_bit);
28+
EXPORT_SYMBOL(find_next_bit);
2929

3030
EXPORT_SYMBOL(__backtrace);
3131

‎arch/unicore32/lib/findbit.S‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Purpose : Find a 'zero' bit
1818
* Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit);
1919
*/
20-
__uc32_find_first_zero_bit:
20+
ENTRY(find_first_zero_bit)
2121
cxor.a r1, #0
2222
beq 3f
2323
mov r2, #0
@@ -29,13 +29,14 @@ __uc32_find_first_zero_bit:
2929
bub 1b
3030
3: mov r0, r1 @ no free bits
3131
mov pc, lr
32+
ENDPROC(find_first_zero_bit)
3233

3334
/*
3435
* Purpose : Find next 'zero' bit
3536
* Prototype: int find_next_zero_bit
3637
* (void *addr, unsigned int maxbit, int offset)
3738
*/
38-
ENTRY(__uc32_find_next_zero_bit)
39+
ENTRY(find_next_zero_bit)
3940
cxor.a r1, #0
4041
beq 3b
4142
and.a ip, r2, #7
@@ -47,14 +48,14 @@ ENTRY(__uc32_find_next_zero_bit)
4748
or r2, r2, #7 @ if zero, then no bits here
4849
add r2, r2, #1 @ align bit pointer
4950
b 2b @ loop for next bit
50-
ENDPROC(__uc32_find_next_zero_bit)
51+
ENDPROC(find_next_zero_bit)
5152

5253
/*
5354
* Purpose : Find a 'one' bit
5455
* Prototype: int find_first_bit
5556
* (const unsigned long *addr, unsigned int maxbit);
5657
*/
57-
__uc32_find_first_bit:
58+
ENTRY(find_first_bit)
5859
cxor.a r1, #0
5960
beq 3f
6061
mov r2, #0
@@ -66,13 +67,14 @@ __uc32_find_first_bit:
6667
bub 1b
6768
3: mov r0, r1 @ no free bits
6869
mov pc, lr
70+
ENDPROC(find_first_bit)
6971

7072
/*
7173
* Purpose : Find next 'one' bit
7274
* Prototype: int find_next_zero_bit
7375
* (void *addr, unsigned int maxbit, int offset)
7476
*/
75-
ENTRY(__uc32_find_next_bit)
77+
ENTRY(find_next_bit)
7678
cxor.a r1, #0
7779
beq 3b
7880
and.a ip, r2, #7
@@ -83,7 +85,7 @@ ENTRY(__uc32_find_next_bit)
8385
or r2, r2, #7 @ if zero, then no bits here
8486
add r2, r2, #1 @ align bit pointer
8587
b 2b @ loop for next bit
86-
ENDPROC(__uc32_find_next_bit)
88+
ENDPROC(find_next_bit)
8789

8890
/*
8991
* One or more bits in the LSB of r3 are assumed to be set.

0 commit comments

Comments
 (0)