By directly using find_first_bit() and find_next_bit from the
"bitops.h" API to iterate over the bitmap, we can remove the
bitmap[] variable-length array copy on the stack and the complex
manual bit testing/clearing logic.
Suggested-by: Stefan Hajnoczi<stefanha@redhat.com>
Suggested-by: Richard Henderson<richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé<philmd@redhat.com>
---
hw/block/dataplane/virtio-blk.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)