[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1303910411-15793-8-git-send-email-akinobu.mita@gmail.com>
Date: Wed, 27 Apr 2011 22:20:11 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
akpm@...ux-foundation.org, arnd@...db.de
Cc: Akinobu Mita <akinobu.mita@...il.com>,
Greg Ungerer <gerg@...inux.org>
Subject: [PATCH v3 7/7] m68knommu: use generic find_next_bit_le()
The implementation of find_next_bit_le() on m68knommu is
identical with the generic implementation of find_next_bit_le().
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
Cc: Greg Ungerer <gerg@...inux.org>
---
arch/m68k/include/asm/bitops_no.h | 46 +-----------------------------------
1 files changed, 2 insertions(+), 44 deletions(-)
diff --git a/arch/m68k/include/asm/bitops_no.h b/arch/m68k/include/asm/bitops_no.h
index cd229fb..c4250ae 100644
--- a/arch/m68k/include/asm/bitops_no.h
+++ b/arch/m68k/include/asm/bitops_no.h
@@ -337,50 +337,8 @@ found_middle:
}
#define find_next_zero_bit_le find_next_zero_bit_le
-static inline unsigned long find_next_bit_le(const void *addr, unsigned
- long size, unsigned long offset)
-{
- const unsigned long *p = addr;
- unsigned long result = offset & ~(BITS_PER_LONG - 1);
- unsigned long tmp;
-
- if (offset >= size)
- return size;
- p += offset / BITS_PER_LONG;
- size -= result;
- offset &= (BITS_PER_LONG - 1UL);
- if (offset) {
- tmp = __swab32(*(p++));
- tmp &= (~0UL << offset);
- if (size < BITS_PER_LONG)
- goto found_first;
- if (tmp)
- goto found_middle;
- size -= BITS_PER_LONG;
- result += BITS_PER_LONG;
- }
-
- while (size & ~(BITS_PER_LONG - 1)) {
- tmp = *(p++);
- if (tmp)
- goto found_middle_swap;
- result += BITS_PER_LONG;
- size -= BITS_PER_LONG;
- }
- if (!size)
- return result;
- tmp = __swab32(*p);
-found_first:
- tmp &= (~0UL >> (BITS_PER_LONG - size));
- if (tmp == 0UL) /* Are any bits set? */
- return result + size; /* Nope. */
-found_middle:
- return result + __ffs(tmp);
-
-found_middle_swap:
- return result + __ffs(__swab32(tmp));
-}
-#define find_next_bit_le find_next_bit_le
+extern unsigned long find_next_bit_le(const void *addr,
+ unsigned long size, unsigned long offset);
#endif /* __KERNEL__ */
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists