Patchwork ehci: fix assertion typo

login
register
mail settings
Submitter Alejandro Martinez Ruiz
Date Aug. 14, 2012, 2:13 p.m.
Message ID <1344953582-24303-1-git-send-email-alex@securiforest.com>
Download mbox | patch
Permalink /patch/177284/
State New
Headers show

Comments

Alejandro Martinez Ruiz - Aug. 14, 2012, 2:13 p.m.
Signed-off-by: Alejandro Martinez Ruiz <alex@securiforest.com>
---
 hw/usb/hcd-ehci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Andreas Färber - Aug. 14, 2012, 3:27 p.m.
Am 14.08.2012 16:13, schrieb Alejandro Martinez Ruiz:
> Signed-off-by: Alejandro Martinez Ruiz <alex@securiforest.com>
> ---
>  hw/usb/hcd-ehci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Andreas Färber <afaerber@suse.de>

Patch looks like a sensible bugfix for 1.2, we most likely don't intend
to overwrite the status. Gerd, could you take a second look?

Andreas

> 
> diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
> index b043e7c..104c21d 100644
> --- a/hw/usb/hcd-ehci.c
> +++ b/hw/usb/hcd-ehci.c
> @@ -2010,7 +2010,7 @@ static void ehci_fill_queue(EHCIPacket *p)
>          p->qtdaddr = qtdaddr;
>          p->qtd = qtd;
>          p->usb_status = ehci_execute(p, "queue");
> -        assert(p->usb_status = USB_RET_ASYNC);
> +        assert(p->usb_status == USB_RET_ASYNC);
>          p->async = EHCI_ASYNC_INFLIGHT;
>      }
>  }
>
Stefan Hajnoczi - Aug. 15, 2012, 1:35 p.m.
On Tue, Aug 14, 2012 at 04:13:02PM +0200, Alejandro Martinez Ruiz wrote:
> Signed-off-by: Alejandro Martinez Ruiz <alex@securiforest.com>
> ---
>  hw/usb/hcd-ehci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks good but would be good to hear from Gerd just to be sure.

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan

Patch

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index b043e7c..104c21d 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -2010,7 +2010,7 @@  static void ehci_fill_queue(EHCIPacket *p)
         p->qtdaddr = qtdaddr;
         p->qtd = qtd;
         p->usb_status = ehci_execute(p, "queue");
-        assert(p->usb_status = USB_RET_ASYNC);
+        assert(p->usb_status == USB_RET_ASYNC);
         p->async = EHCI_ASYNC_INFLIGHT;
     }
 }