Patchwork use: fix bit test

login
register
mail settings
Submitter Lai Jiangshan
Date April 2, 2012, 6:35 a.m.
Message ID <4F7948B2.4090100@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/150079/
State New
Headers show

Comments

Lai Jiangshan - April 2, 2012, 6:35 a.m.
use & instead of the wrong &&

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
Andreas Färber - April 2, 2012, 9:50 a.m.
Am 02.04.2012 08:35, schrieb Lai Jiangshan:
> 
> use & instead of the wrong &&
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Patch looks okay but the subject should probably be fixed to say "usb:"
when applying. :)

Andreas

> ---
> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
> index 73b0c7f..89c2406 100644
> --- a/hw/usb/hcd-xhci.c
> +++ b/hw/usb/hcd-xhci.c
> @@ -502,7 +502,7 @@ static void xhci_irq_update(XHCIState *xhci)
>      int level = 0;
>  
>      if (xhci->iman & IMAN_IP && xhci->iman & IMAN_IE &&
> -        xhci->usbcmd && USBCMD_INTE) {
> +        xhci->usbcmd & USBCMD_INTE) {
>          level = 1;
>      }
>
Lai Jiangshan - April 3, 2012, 2:52 a.m.
On 04/02/2012 05:50 PM, Andreas Färber wrote:
> Am 02.04.2012 08:35, schrieb Lai Jiangshan:
>>
>> use & instead of the wrong &&
>>
>> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> 
> Patch looks okay but the subject should probably be fixed to say "usb:"
> when applying. :)
> 

Thank you!!

Hi, Gerd,

Does this patch have any problem?
could you merge it with "use:"->"usb:" in the title.
(I think it is not good to send another patch for this)

Thanks
Lai

> 
>> ---
>> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
>> index 73b0c7f..89c2406 100644
>> --- a/hw/usb/hcd-xhci.c
>> +++ b/hw/usb/hcd-xhci.c
>> @@ -502,7 +502,7 @@ static void xhci_irq_update(XHCIState *xhci)
>>      int level = 0;
>>  
>>      if (xhci->iman & IMAN_IP && xhci->iman & IMAN_IE &&
>> -        xhci->usbcmd && USBCMD_INTE) {
>> +        xhci->usbcmd & USBCMD_INTE) {
>>          level = 1;
>>      }
>>  
>
Gerd Hoffmann - April 19, 2012, 12:16 p.m.
On 04/02/12 08:35, Lai Jiangshan wrote:
> use & instead of the wrong &&

Fixed $subject and added to usb patch queue.

thanks,
  Gerd

Patch

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 73b0c7f..89c2406 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -502,7 +502,7 @@  static void xhci_irq_update(XHCIState *xhci)
     int level = 0;
 
     if (xhci->iman & IMAN_IP && xhci->iman & IMAN_IE &&
-        xhci->usbcmd && USBCMD_INTE) {
+        xhci->usbcmd & USBCMD_INTE) {
         level = 1;
     }