Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 359c47ea authored by Geert Uytterhoeven's avatar Geert Uytterhoeven
Browse files

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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 61c4f2c8
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -220,8 +220,7 @@ static inline int find_next_zero_bit(const unsigned long *vaddr, int size,
		offset += 32;
	}
	/* No zero yet, search remaining full bytes for a zero */
	res = find_first_zero_bit(p, size - ((long)p - (long)vaddr) * 8);
	return offset + res;
	return offset + find_first_zero_bit(p, size - offset);
}

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,
		offset += 32;
	}
	/* No one yet, search remaining full bytes for a one */
	res = find_first_bit(p, size - ((long)p - (long)vaddr) * 8);
	return offset + res;
	return offset + find_first_bit(p, size - offset);
}

/*