This patch fixes compilation warning, since argument to ufs_process_db()
passed to find_first_bit() that expects unsigned long value.

The exact warnings are:

warning: incompatible pointer types passing 'uint64_t *' (aka 'unsigned
long long *') to parameter of type 'const unsigned long *'
[-Wincompatible-pointer-types]
    slot = find_first_bit(&val, nutrs);
                          ^~~~
warning: incompatible pointer types passing 'uint64_t *' (aka 'unsigned
long long *') to parameter of type 'const unsigned long *'
[-Wincompatible-pointer-types]
        slot = find_next_bit(&val, nutrs, slot + 1);
                             ^~~~

Cc: Jeuk Kim <jeuk20....@samsung.com>
Cc: Stefan Hajnoczi <stefa...@redhat.com>
Signed-off-by: Mike Maslenkin <mike.maslen...@gmail.com>
---
 hw/ufs/ufs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c
index af32366c8504..b0656e47598e 100644
--- a/hw/ufs/ufs.c
+++ b/hw/ufs/ufs.c
@@ -267,7 +267,7 @@ static void ufs_process_db(UfsHc *u, uint64_t val)
         return;
     }
 
-    slot = find_first_bit(&val, nutrs);
+    slot = find_first_bit((unsigned long *) &val, nutrs);
 
     while (slot < nutrs) {
         req = &u->req_list[slot];
@@ -283,7 +283,7 @@ static void ufs_process_db(UfsHc *u, uint64_t val)
 
         trace_ufs_process_db(slot);
         req->state = UFS_REQUEST_READY;
-        slot = find_next_bit(&val, nutrs, slot + 1);
+        slot = find_next_bit((unsigned long *) &val, nutrs, slot + 1);
     }
 
     qemu_bh_schedule(u->doorbell_bh);
-- 
2.32.0 (Apple Git-132)


Reply via email to