Re: [PATCH v3 06/22] m68knommu: introduce little-endian bitops

From: Akinobu Mita
Date: Thu Nov 25 2010 - 03:46:10 EST


2010/11/23 Akinobu Mita <akinobu.mita@xxxxxxxxx>:
> Introduce little-endian bit operations by renaming native ext2 bit
> operations. The ext2 bit operations are kept as wrapper macros using
> little-endian bit operations to maintain bisectability until the
> conversions are finished.

This breaks the build on m68knommu.

lib/find_next_bit.c:190: error: conflicting types for 'find_next_zero_le_bit'
/home/mita/scm/linux-2.6/arch/m68k/include/asm/bitops_no.h:286: error: previous
definition of 'find_next_zero_le_bit' was here

> @@ -271,10 +279,10 @@ static __inline__ int ext2_test_bit(int nr, const volatile void * addr)
>        return retval;
>  }
>
> -#define ext2_find_first_zero_bit(addr, size) \
> -        ext2_find_next_zero_bit((addr), (size), 0)
> +#define find_first_zero_le_bit(addr, size)     \
> +       find_next_zero_le_bit((addr), (size), 0)
>
> -static __inline__ unsigned long ext2_find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
> +static inline unsigned long find_next_zero_le_bit(void *addr, unsigned long size, unsigned long offset)
>  {
>        unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
>        unsigned long result = offset & ~31UL;

Because m68knommu selects CONFIG_GENERIC_FIND_NEXT_BIT, it redefines
find_next_zero_le_bit() in lib/find_next_bit.c.

I'm going to fix it by introducing new CONFIG_GENERIC_FIND_LE_BIT option.

CONFIG_GENERIC_FIND_LE_BIT tells whether to use generic implementation of
find_*_le_bit() in lib/find_next_bit.c or not. It will not be selected by
m68knommu to use the optimized find_next_zero_le_bit().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/