Re: [patch] USB: chipidea: fix vs | bug

2013-02-15 Thread Dan Carpenter
On Fri, Sep 14, 2012 at 02:58:20PM +0800, Richard Zhao wrote:
 On Fri, Sep 14, 2012 at 09:50:56AM +0300, Dan Carpenter wrote:
  There is a '' vs '|' typo in the original code so the condition is
  never true and we don't queue the work.
  
  Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
  ---
  
  diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
  index 2f45bba..5294f81 100644
  --- a/drivers/usb/chipidea/udc.c
  +++ b/drivers/usb/chipidea/udc.c
  @@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci)
  intr = hw_read(ci, OP_OTGSC, ~0);
  hw_write(ci, OP_OTGSC, ~0, intr);
   
  -   if (intr  (OTGSC_AVVIE  OTGSC_AVVIS))
  +   if (intr  (OTGSC_AVVIE | OTGSC_AVVIS))
 It's not what I meant. Should be
 if ((intr  OTGSC_AVVIE)  (intr  OTGSC_AVVIS))
 I'm still testing it.

How did the testing go?

regards,
dan carpenter

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] USB: chipidea: fix vs | bug

2013-02-15 Thread Dan Carpenter
On Fri, Feb 15, 2013 at 01:26:29PM +0300, Dan Carpenter wrote:
 On Fri, Sep 14, 2012 at 02:58:20PM +0800, Richard Zhao wrote:
  On Fri, Sep 14, 2012 at 09:50:56AM +0300, Dan Carpenter wrote:
   There is a '' vs '|' typo in the original code so the condition is
   never true and we don't queue the work.
   
   Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
   ---
   
   diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
   index 2f45bba..5294f81 100644
   --- a/drivers/usb/chipidea/udc.c
   +++ b/drivers/usb/chipidea/udc.c
   @@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci)
 intr = hw_read(ci, OP_OTGSC, ~0);
 hw_write(ci, OP_OTGSC, ~0, intr);

   - if (intr  (OTGSC_AVVIE  OTGSC_AVVIS))
   + if (intr  (OTGSC_AVVIE | OTGSC_AVVIS))
  It's not what I meant. Should be
  if ((intr  OTGSC_AVVIE)  (intr  OTGSC_AVVIS))
  I'm still testing it.
 
 How did the testing go?


Richard's email is bouncing.  Probably I should just send this
myself.

regards,
dan carpenter

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] USB: chipidea: fix vs | bug

2013-02-15 Thread Dan Carpenter
On Fri, Feb 15, 2013 at 02:54:56PM +0200, Alexander Shishkin wrote:
 Dan Carpenter dan.carpen...@oracle.com writes:
 
  On Fri, Feb 15, 2013 at 01:26:29PM +0300, Dan Carpenter wrote:
  On Fri, Sep 14, 2012 at 02:58:20PM +0800, Richard Zhao wrote:
   On Fri, Sep 14, 2012 at 09:50:56AM +0300, Dan Carpenter wrote:
There is a '' vs '|' typo in the original code so the condition is
never true and we don't queue the work.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 2f45bba..5294f81 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci)
   intr = hw_read(ci, OP_OTGSC, ~0);
   hw_write(ci, OP_OTGSC, ~0, intr);
 
-  if (intr  (OTGSC_AVVIE  OTGSC_AVVIS))
+  if (intr  (OTGSC_AVVIE | OTGSC_AVVIS))
   It's not what I meant. Should be
   if ((intr  OTGSC_AVVIE)  (intr  OTGSC_AVVIS))
   I'm still testing it.
  
  How did the testing go?
 
 
  Richard's email is bouncing.  Probably I should just send this
  myself.
 
 We're reverting this commit for 3.10 as part of Peter's vbus detection
 patchset. If it seems more urgent, I guess we can revert it earlier as a
 bugfix. Otherwise, I'd just leave it till 3.10.

No rush.  It's just a static checker thing.

regards,
dan carpenter

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] USB: chipidea: fix vs | bug

2013-02-15 Thread Alexander Shishkin
Dan Carpenter dan.carpen...@oracle.com writes:

 On Fri, Feb 15, 2013 at 02:54:56PM +0200, Alexander Shishkin wrote:
 Dan Carpenter dan.carpen...@oracle.com writes:
 
  On Fri, Feb 15, 2013 at 01:26:29PM +0300, Dan Carpenter wrote:
  On Fri, Sep 14, 2012 at 02:58:20PM +0800, Richard Zhao wrote:
   On Fri, Sep 14, 2012 at 09:50:56AM +0300, Dan Carpenter wrote:
There is a '' vs '|' typo in the original code so the condition is
never true and we don't queue the work.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 2f45bba..5294f81 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci)
  intr = hw_read(ci, OP_OTGSC, ~0);
  hw_write(ci, OP_OTGSC, ~0, intr);
 
- if (intr  (OTGSC_AVVIE  OTGSC_AVVIS))
+ if (intr  (OTGSC_AVVIE | OTGSC_AVVIS))
   It's not what I meant. Should be
   if ((intr  OTGSC_AVVIE)  (intr  OTGSC_AVVIS))
   I'm still testing it.
  
  How did the testing go?
 
 
  Richard's email is bouncing.  Probably I should just send this
  myself.
 
 We're reverting this commit for 3.10 as part of Peter's vbus detection
 patchset. If it seems more urgent, I guess we can revert it earlier as a
 bugfix. Otherwise, I'd just leave it till 3.10.

 No rush.  It's just a static checker thing.

Ok, thanks.

Regards,
--
Alex
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch] USB: chipidea: fix vs | bug

2012-09-14 Thread Dan Carpenter
There is a '' vs '|' typo in the original code so the condition is
never true and we don't queue the work.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 2f45bba..5294f81 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci)
intr = hw_read(ci, OP_OTGSC, ~0);
hw_write(ci, OP_OTGSC, ~0, intr);
 
-   if (intr  (OTGSC_AVVIE  OTGSC_AVVIS))
+   if (intr  (OTGSC_AVVIE | OTGSC_AVVIS))
queue_work(ci-wq, ci-vbus_work);
 
spin_unlock(ci-lock);
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] USB: chipidea: fix vs | bug

2012-09-14 Thread Richard Zhao
On Fri, Sep 14, 2012 at 09:50:56AM +0300, Dan Carpenter wrote:
 There is a '' vs '|' typo in the original code so the condition is
 never true and we don't queue the work.
 
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
 ---
 
 diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
 index 2f45bba..5294f81 100644
 --- a/drivers/usb/chipidea/udc.c
 +++ b/drivers/usb/chipidea/udc.c
 @@ -1680,7 +1680,7 @@ static irqreturn_t udc_irq(struct ci13xxx *ci)
   intr = hw_read(ci, OP_OTGSC, ~0);
   hw_write(ci, OP_OTGSC, ~0, intr);
  
 - if (intr  (OTGSC_AVVIE  OTGSC_AVVIS))
 + if (intr  (OTGSC_AVVIE | OTGSC_AVVIS))
It's not what I meant. Should be
if ((intr  OTGSC_AVVIE)  (intr  OTGSC_AVVIS))
I'm still testing it.

Thanks
Richard
   queue_work(ci-wq, ci-vbus_work);
  
   spin_unlock(ci-lock);
 

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html