re: USB: chipidea: add vbus detect for udc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Richard Zhao,

The patch 8c4fc031954b: "USB: chipidea: add vbus detect for udc" from 
Sep 12, 2012, leads to the following Smatch warning:
drivers/usb/chipidea/udc.c:1683 udc_irq()
	 warn: odd binop '0x2000000 & 0x20000'

  1680          intr = hw_read(ci, OP_OTGSC, ~0);
  1681          hw_write(ci, OP_OTGSC, ~0, intr);
  1682  
  1683          if (intr & (OTGSC_AVVIE & OTGSC_AVVIS))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is never true.  I think it should either be:
		if (intr & (OTGSC_AVVIE | OTGSC_AVVIS))
or
		if ((intr & OTGSC_AVVIE) && (intr & OTGSC_AVVIE))

  1684                  queue_work(ci->wq, &ci->vbus_work);
  1685  

regards,
dan carpenter

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux