TO: Felipe Balbi <[email protected]>
CC: Peter Chen <[email protected]>
tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ebc7163fafb29c390519378897c201748acc2756
commit: 8e74475b0e0ac2fd3634f3c1b9a109fb1d6269f7 [5857/6262] usb: dwc3: gadget:
use udc-core's reset notifier
reproduce:
# apt-get install sparse
git checkout 8e74475b0e0ac2fd3634f3c1b9a109fb1d6269f7
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
:::::: branch date: 6 hours ago
:::::: commit date: 2 days ago
drivers/usb/dwc3/gadget.c:1673:37: sparse: dubious: x | !y
>> drivers/usb/dwc3/gadget.c:2042:28: sparse: context imbalance in
>> 'dwc3_resume_gadget' - unexpected unlock
git remote add next
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update next
git checkout 8e74475b0e0ac2fd3634f3c1b9a109fb1d6269f7
vim +/dwc3_resume_gadget +2042 drivers/usb/dwc3/gadget.c
72246da4 Felipe Balbi 2011-08-19 2026 spin_lock(&dwc->lock);
72246da4 Felipe Balbi 2011-08-19 2027 }
72246da4 Felipe Balbi 2011-08-19 2028 }
72246da4 Felipe Balbi 2011-08-19 2029
bc5ba2e0 Felipe Balbi 2014-02-26 2030 static void dwc3_suspend_gadget(struct
dwc3 *dwc)
bc5ba2e0 Felipe Balbi 2014-02-26 2031 {
73a30bfc Dan Carpenter 2014-03-07 2032 if (dwc->gadget_driver &&
dwc->gadget_driver->suspend) {
bc5ba2e0 Felipe Balbi 2014-02-26 2033 spin_unlock(&dwc->lock);
bc5ba2e0 Felipe Balbi 2014-02-26 2034
dwc->gadget_driver->suspend(&dwc->gadget);
bc5ba2e0 Felipe Balbi 2014-02-26 2035 spin_lock(&dwc->lock);
bc5ba2e0 Felipe Balbi 2014-02-26 2036 }
bc5ba2e0 Felipe Balbi 2014-02-26 2037 }
bc5ba2e0 Felipe Balbi 2014-02-26 2038
bc5ba2e0 Felipe Balbi 2014-02-26 2039 static void dwc3_resume_gadget(struct
dwc3 *dwc)
bc5ba2e0 Felipe Balbi 2014-02-26 2040 {
73a30bfc Dan Carpenter 2014-03-07 2041 if (dwc->gadget_driver &&
dwc->gadget_driver->resume) {
bc5ba2e0 Felipe Balbi 2014-02-26 @2042 spin_unlock(&dwc->lock);
bc5ba2e0 Felipe Balbi 2014-02-26 2043
dwc->gadget_driver->resume(&dwc->gadget);
8e74475b Felipe Balbi 2014-11-06 2044 }
8e74475b Felipe Balbi 2014-11-06 2045 }
8e74475b Felipe Balbi 2014-11-06 2046
8e74475b Felipe Balbi 2014-11-06 2047 static void dwc3_reset_gadget(struct
dwc3 *dwc)
8e74475b Felipe Balbi 2014-11-06 2048 {
8e74475b Felipe Balbi 2014-11-06 2049 if (!dwc->gadget_driver)
8e74475b Felipe Balbi 2014-11-06 2050 return;
:::::: The code at line 2042 was first introduced by commit
:::::: bc5ba2e0b829c9397f96df1191c7d2319ebc36d9 usb: dwc3: gadget: call gadget
driver's ->suspend/->resume
:::::: TO: Felipe Balbi <[email protected]>
:::::: CC: Felipe Balbi <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
_______________________________________________
kbuild mailing list
[email protected]
https://lists.01.org/mailman/listinfo/kbuild