* [PATCH 1/3] hw/ufs: fix compilation warning
2023-07-27 23:34 [PATCH 0/3] hw/ufs: fix compilation warnings Mike Maslenkin
@ 2023-07-27 23:34 ` Mike Maslenkin
2023-07-27 23:34 ` [PATCH 2/3] " Mike Maslenkin
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Mike Maslenkin @ 2023-07-27 23:34 UTC (permalink / raw)
Cc: qemu-devel, jeuk20.kim, stefanha, Mike Maslenkin
This patch fixes a compilation warning: implicit conversion from enumeration
type 'enum UfsRequestState' to different enumeration type 'UfsReqResult'
(aka 'enum UfsReqResult') [-Wenum-conversion]
ufs_exec_scsi_cmd() returns a value from UfsReqResult enum.
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 1760e0f88d70..af32366c8504 100644
--- a/hw/ufs/ufs.c
+++ b/hw/ufs/ufs.c
@@ -514,10 +514,10 @@ static UfsReqResult ufs_exec_scsi_cmd(UfsRequest *req)
if (!is_wlun(lun)) {
if (lun >= u->device_desc.number_lu) {
trace_ufs_err_scsi_cmd_invalid_lun(lun);
- return UFS_REQUEST_ERROR;
+ return UFS_REQUEST_FAIL;
} else if (u->lus[lun] == NULL) {
trace_ufs_err_scsi_cmd_invalid_lun(lun);
- return UFS_REQUEST_ERROR;
+ return UFS_REQUEST_FAIL;
}
}
--
2.32.0 (Apple Git-132)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] hw/ufs: fix compilation warning
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
2023-07-27 23:34 ` [PATCH 3/3] hw/ufs: change ufs_process_db signature Mike Maslenkin
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Mike Maslenkin @ 2023-07-27 23:34 UTC (permalink / raw)
Cc: qemu-devel, jeuk20.kim, stefanha, Mike Maslenkin
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)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] hw/ufs: change ufs_process_db signature
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 ` [PATCH 2/3] " Mike Maslenkin
@ 2023-07-27 23:34 ` Mike Maslenkin
[not found] ` <CGME20230727233426epcas2p42f9a359efad22cda0b6ae6cf5c200ea0@epcms2p3>
2023-08-01 21:03 ` Philippe Mathieu-Daudé
4 siblings, 0 replies; 8+ messages in thread
From: Mike Maslenkin @ 2023-07-27 23:34 UTC (permalink / raw)
Cc: qemu-devel, jeuk20.kim, stefanha, Mike Maslenkin
Actually UTRLDBR is 32bit register. There is no need to pass 64bit
value to ufs_process_db() function.
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c
index b0656e47598e..af57ba6df02c 100644
--- a/hw/ufs/ufs.c
+++ b/hw/ufs/ufs.c
@@ -256,7 +256,7 @@ static void ufs_irq_check(UfsHc *u)
}
}
-static void ufs_process_db(UfsHc *u, uint64_t val)
+static void ufs_process_db(UfsHc *u, uint32_t val)
{
uint32_t slot;
uint32_t nutrs = u->params.nutrs;
--
2.32.0 (Apple Git-132)
^ permalink raw reply related [flat|nested] 8+ messages in thread
[parent not found: <CGME20230727233426epcas2p42f9a359efad22cda0b6ae6cf5c200ea0@epcms2p3>]
* Re: [PATCH 0/3] hw/ufs: fix compilation warnings
2023-07-27 23:34 [PATCH 0/3] hw/ufs: fix compilation warnings Mike Maslenkin
` (3 preceding siblings ...)
[not found] ` <CGME20230727233426epcas2p42f9a359efad22cda0b6ae6cf5c200ea0@epcms2p3>
@ 2023-08-01 21:03 ` Philippe Mathieu-Daudé
2023-08-02 0:52 ` Jeuk Kim
4 siblings, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-01 21:03 UTC (permalink / raw)
To: Mike Maslenkin; +Cc: qemu-devel, jeuk20.kim, stefanha
Hi Mike,
On 28/7/23 01:34, Mike Maslenkin wrote:
> This patchset contains a trivial compilation fixes for UFS support
> applied to block-next tree.
Since the series isn't merged, it would be clearer to send
a v9 of "hw/ufs: Add Universal Flash Storage (UFS) support"
with the fixes squashed in (there is still time).
Regards,
Phil.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] hw/ufs: fix compilation warnings
2023-08-01 21:03 ` Philippe Mathieu-Daudé
@ 2023-08-02 0:52 ` Jeuk Kim
2023-08-02 8:37 ` Mike Maslenkin
0 siblings, 1 reply; 8+ messages in thread
From: Jeuk Kim @ 2023-08-02 0:52 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Mike Maslenkin
Cc: qemu-devel, jeuk20.kim, stefanha
On 8/2/2023 6:03 AM, Philippe Mathieu-Daudé wrote:
> Hi Mike,
>
> On 28/7/23 01:34, Mike Maslenkin wrote:
>> This patchset contains a trivial compilation fixes for UFS support
>> applied to block-next tree.
>
> Since the series isn't merged, it would be clearer to send
> a v9 of "hw/ufs: Add Universal Flash Storage (UFS) support"
> with the fixes squashed in (there is still time).
>
> Regards,
>
> Phil.
>
Hi Phil,
Thanks for your comment.
If Mike is okay, I'll send v9 of "hw/ufs: Add Universal Flash Storage
UFS) support" with the fixes.
To Mike,
Is it okay with you if I make a patch v9, incorporating your fixes?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] hw/ufs: fix compilation warnings
2023-08-02 0:52 ` Jeuk Kim
@ 2023-08-02 8:37 ` Mike Maslenkin
0 siblings, 0 replies; 8+ messages in thread
From: Mike Maslenkin @ 2023-08-02 8:37 UTC (permalink / raw)
To: Jeuk Kim; +Cc: Philippe Mathieu-Daudé, qemu-devel, jeuk20.kim, stefanha
Hello All,
I'm ok with that.
Regards,
Mike.
On Wed, Aug 2, 2023 at 3:52 AM Jeuk Kim <jeuk20.kim@gmail.com> wrote:
>
> On 8/2/2023 6:03 AM, Philippe Mathieu-Daudé wrote:
> > Hi Mike,
> >
> > On 28/7/23 01:34, Mike Maslenkin wrote:
> >> This patchset contains a trivial compilation fixes for UFS support
> >> applied to block-next tree.
> >
> > Since the series isn't merged, it would be clearer to send
> > a v9 of "hw/ufs: Add Universal Flash Storage (UFS) support"
> > with the fixes squashed in (there is still time).
> >
> > Regards,
> >
> > Phil.
> >
>
> Hi Phil,
> Thanks for your comment.
> If Mike is okay, I'll send v9 of "hw/ufs: Add Universal Flash Storage
> UFS) support" with the fixes.
>
> To Mike,
> Is it okay with you if I make a patch v9, incorporating your fixes?
^ permalink raw reply [flat|nested] 8+ messages in thread