qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mike Maslenkin <mike.maslenkin@gmail.com>
Cc: qemu-devel@nongnu.org, jeuk20.kim@samsung.com,
	stefanha@redhat.com, Mike Maslenkin <mike.maslenkin@gmail.com>
Subject: [PATCH 2/3] hw/ufs: fix compilation warning
Date: Fri, 28 Jul 2023 02:34:04 +0300	[thread overview]
Message-ID: <20230727233405.35937-3-mike.maslenkin@gmail.com> (raw)
In-Reply-To: <20230727233405.35937-1-mike.maslenkin@gmail.com>

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



  parent reply	other threads:[~2023-07-27 23:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 23:34 [PATCH 0/3] hw/ufs: fix compilation warnings Mike Maslenkin
2023-07-27 23:34 ` [PATCH 1/3] hw/ufs: fix compilation warning Mike Maslenkin
2023-07-27 23:34 ` Mike Maslenkin [this message]
2023-07-27 23:34 ` [PATCH 3/3] hw/ufs: change ufs_process_db signature Mike Maslenkin
     [not found] ` <CGME20230727233426epcas2p42f9a359efad22cda0b6ae6cf5c200ea0@epcms2p3>
2023-08-01  0:08   ` [PATCH 0/3] hw/ufs: fix compilation warnings Jeuk Kim
2023-08-01 21:03 ` Philippe Mathieu-Daudé
2023-08-02  0:52   ` Jeuk Kim
2023-08-02  8:37     ` Mike Maslenkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230727233405.35937-3-mike.maslenkin@gmail.com \
    --to=mike.maslenkin@gmail.com \
    --cc=jeuk20.kim@samsung.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).