Commit aabf199c authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Ulf Hansson
Browse files

memstick/ms_block: Use the bitmap API when applicable



Use bitmap_equal() instead of hand writing it. It improves semantic and
avoids some explicit computation to convert a number of bits to a number of
bytes.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/b216df8798f765ab14bce65739c220643320f376.1656155715.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 54eb7a55
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2245,8 +2245,8 @@ static int msb_resume(struct memstick_dev *card)
		goto out;

	if (msb->block_count != new_msb->block_count ||
		memcmp(msb->used_blocks_bitmap, new_msb->used_blocks_bitmap,
							msb->block_count / 8))
	    !bitmap_equal(msb->used_blocks_bitmap, new_msb->used_blocks_bitmap,
							msb->block_count))
		goto out;

	card_dead = false;