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

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>

+16 -14
+6 -6
arch/unicore32/include/asm/bitops.h
··· 13 13 #ifndef __UNICORE_BITOPS_H__ 14 14 #define __UNICORE_BITOPS_H__ 15 15 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 - 22 16 #define _ASM_GENERIC_BITOPS_FLS_H_ 23 17 #define _ASM_GENERIC_BITOPS___FLS_H_ 24 18 #define _ASM_GENERIC_BITOPS_FFS_H_ ··· 37 43 #define __ffs(x) (ffs(x) - 1) 38 44 39 45 #include <asm-generic/bitops.h> 46 + 47 + /* following definitions: to avoid using codes in lib/find_*.c */ 48 + #define find_next_bit find_next_bit 49 + #define find_next_zero_bit find_next_zero_bit 50 + #define find_first_bit find_first_bit 51 + #define find_first_zero_bit find_first_zero_bit 40 52 41 53 #endif /* __UNICORE_BITOPS_H__ */
+2 -2
arch/unicore32/kernel/ksyms.c
··· 24 24 25 25 #include "ksyms.h" 26 26 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); 29 29 30 30 EXPORT_SYMBOL(__backtrace); 31 31
+8 -6
arch/unicore32/lib/findbit.S
··· 17 17 * Purpose : Find a 'zero' bit 18 18 * Prototype: int find_first_zero_bit(void *addr, unsigned int maxbit); 19 19 */ 20 - __uc32_find_first_zero_bit: 20 + ENTRY(find_first_zero_bit) 21 21 cxor.a r1, #0 22 22 beq 3f 23 23 mov r2, #0 ··· 29 29 bub 1b 30 30 3: mov r0, r1 @ no free bits 31 31 mov pc, lr 32 + ENDPROC(find_first_zero_bit) 32 33 33 34 /* 34 35 * Purpose : Find next 'zero' bit 35 36 * Prototype: int find_next_zero_bit 36 37 * (void *addr, unsigned int maxbit, int offset) 37 38 */ 38 - ENTRY(__uc32_find_next_zero_bit) 39 + ENTRY(find_next_zero_bit) 39 40 cxor.a r1, #0 40 41 beq 3b 41 42 and.a ip, r2, #7 ··· 48 47 or r2, r2, #7 @ if zero, then no bits here 49 48 add r2, r2, #1 @ align bit pointer 50 49 b 2b @ loop for next bit 51 - ENDPROC(__uc32_find_next_zero_bit) 50 + ENDPROC(find_next_zero_bit) 52 51 53 52 /* 54 53 * Purpose : Find a 'one' bit 55 54 * Prototype: int find_first_bit 56 55 * (const unsigned long *addr, unsigned int maxbit); 57 56 */ 58 - __uc32_find_first_bit: 57 + ENTRY(find_first_bit) 59 58 cxor.a r1, #0 60 59 beq 3f 61 60 mov r2, #0 ··· 67 66 bub 1b 68 67 3: mov r0, r1 @ no free bits 69 68 mov pc, lr 69 + ENDPROC(find_first_bit) 70 70 71 71 /* 72 72 * Purpose : Find next 'one' bit 73 73 * Prototype: int find_next_zero_bit 74 74 * (void *addr, unsigned int maxbit, int offset) 75 75 */ 76 - ENTRY(__uc32_find_next_bit) 76 + ENTRY(find_next_bit) 77 77 cxor.a r1, #0 78 78 beq 3b 79 79 and.a ip, r2, #7 ··· 85 83 or r2, r2, #7 @ if zero, then no bits here 86 84 add r2, r2, #1 @ align bit pointer 87 85 b 2b @ loop for next bit 88 - ENDPROC(__uc32_find_next_bit) 86 + ENDPROC(find_next_bit) 89 87 90 88 /* 91 89 * One or more bits in the LSB of r3 are assumed to be set.