diff mbox series

[2/3] hw/ufs: fix compilation warning

Message ID 20230727233405.35937-3-mike.maslenkin@gmail.com
State New
Headers show
Series hw/ufs: fix compilation warnings | expand

Commit Message

Mike Maslenkin July 27, 2023, 11:34 p.m. UTC
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.kim@samsung.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
---
 hw/ufs/ufs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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);