diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-12-17 13:30:22 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-12-17 13:30:22 +0100 |
commit | c73c32b72df8b9a0e061a83664c585d9ba9c3e37 (patch) | |
tree | 6ae8b05607143ae889887786424a205a1b2cfccf /arch/ppc | |
parent | f6ae48184602d5cc3fef7ec9976f49f9e5649b5d (diff) | |
download | barebox-c73c32b72df8b9a0e061a83664c585d9ba9c3e37.tar.gz barebox-c73c32b72df8b9a0e061a83664c585d9ba9c3e37.tar.xz |
ppc bitops: Fix compiler warning
Our version of ppc bitops produces the following compiler warnings:
/ptx/work/octopus/WORK_1/sha/u-boot/barebox/arch/ppc/include/asm/bitops.h:
In function 'ext2_find_next_zero_bit':
/ptx/work/octopus/WORK_1/sha/u-boot/barebox/arch/ppc/include/asm/bitops.h:294:
warning: '__swab32p' is static but used in inline function 'ext2_find_next_zero_bit' which is not static
Looking at the kernel ext2_find_next_zero_bit is defined as
generic_find_next_zero_le_bit which is in generic kernel code.
We currently do not need this, so do the very same define to silence the
compiler. If somebody ever needs this function, the resulting error
should give him a hint what to do.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/include/asm/bitops.h | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/arch/ppc/include/asm/bitops.h b/arch/ppc/include/asm/bitops.h index e83f0e90d2..8048232325 100644 --- a/arch/ppc/include/asm/bitops.h +++ b/arch/ppc/include/asm/bitops.h @@ -279,41 +279,8 @@ extern __inline__ int ext2_test_bit(int nr, __const__ void * addr) #define ext2_find_first_zero_bit(addr, size) \ ext2_find_next_zero_bit((addr), (size), 0) -extern __inline__ unsigned long ext2_find_next_zero_bit(void *addr, - unsigned long size, unsigned long offset) -{ - unsigned int *p = ((unsigned int *) addr) + (offset >> 5); - unsigned int result = offset & ~31UL; - unsigned int tmp; - - if (offset >= size) - return size; - size -= result; - offset &= 31UL; - if (offset) { - tmp = cpu_to_le32p(p++); - tmp |= ~0UL >> (32-offset); - if (size < 32) - goto found_first; - if (tmp != ~0U) - goto found_middle; - size -= 32; - result += 32; - } - while (size >= 32) { - if ((tmp = cpu_to_le32p(p++)) != ~0U) - goto found_middle; - result += 32; - size -= 32; - } - if (!size) - return result; - tmp = cpu_to_le32p(p); -found_first: - tmp |= ~0U << size; -found_middle: - return result + ffz(tmp); -} +#define ext2_find_next_zero_bit(addr, size, off) \ + generic_find_next_zero_le_bit((unsigned long*)addr, size, off) /* Bitmap functions for the minix filesystem. */ #define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr) |