diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-04-03 07:32:00 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-05-19 12:19:09 -0400 |
commit | 359c47ea71be21c1105ae474e8c90ec3e988bbdf (patch) | |
tree | 0a7d06bad6deb8539716301439d88b269185c61d /arch/m68k | |
parent | 61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff) |
m68k: bitops - offset == ((long)p - (long)vaddr) * 8
Hence use "offset" in find_next_{,zero_}bit(), like is already done for
find_next_{,zero_}bit_le()
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/include/asm/bitops_mm.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/m68k/include/asm/bitops_mm.h b/arch/m68k/include/asm/bitops_mm.h index 9d69f6e62365..5bd3afadeafa 100644 --- a/arch/m68k/include/asm/bitops_mm.h +++ b/arch/m68k/include/asm/bitops_mm.h | |||
@@ -220,8 +220,7 @@ static inline int find_next_zero_bit(const unsigned long *vaddr, int size, | |||
220 | offset += 32; | 220 | offset += 32; |
221 | } | 221 | } |
222 | /* No zero yet, search remaining full bytes for a zero */ | 222 | /* No zero yet, search remaining full bytes for a zero */ |
223 | res = find_first_zero_bit(p, size - ((long)p - (long)vaddr) * 8); | 223 | return offset + find_first_zero_bit(p, size - offset); |
224 | return offset + res; | ||
225 | } | 224 | } |
226 | 225 | ||
227 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size) | 226 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size) |
@@ -267,8 +266,7 @@ static inline int find_next_bit(const unsigned long *vaddr, int size, | |||
267 | offset += 32; | 266 | offset += 32; |
268 | } | 267 | } |
269 | /* No one yet, search remaining full bytes for a one */ | 268 | /* No one yet, search remaining full bytes for a one */ |
270 | res = find_first_bit(p, size - ((long)p - (long)vaddr) * 8); | 269 | return offset + find_first_bit(p, size - offset); |
271 | return offset + res; | ||
272 | } | 270 | } |
273 | 271 | ||
274 | /* | 272 | /* |