On Thu, Oct 05, 2017 at 06:08:19PM +0200, Julia Lawall wrote: > It looks like an unlock is needed before line 1707. > > julia > > ---------- Forwarded message ---------- > Date: Thu, 5 Oct 2017 19:35:31 +0800 > From: kbuild test robot <fengguang.wu@xxxxxxxxx> > To: kbuild@xxxxxx > Cc: Julia Lawall <julia.lawall@xxxxxxx> > Subject: [usb:usb-testing 9/39] drivers/usb/host/max3421-hcd.c:1707:2-8: > preceding lock on line 1702 > > CC: kbuild-all@xxxxxx > CC: linux-usb@xxxxxxxxxxxxxxx > TO: Jules Maselbas <jules.maselbas@xxxxxxxxxxxxxxxx> > CC: "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing > head: 2847d242a1e48ca734cee742efa0f70abf545d1e > commit: 721fdc83b31b1b22c34b2d77304890877c624c6b [9/39] usb: max3421: Add devicetree support > :::::: branch date: 3 hours ago > :::::: commit date: 28 hours ago > > >> drivers/usb/host/max3421-hcd.c:1707:2-8: preceding lock on line 1702 > > # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=721fdc83b31b1b22c34b2d77304890877c624c6b > git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git > git remote update usb > git checkout 721fdc83b31b1b22c34b2d77304890877c624c6b > vim +1707 drivers/usb/host/max3421-hcd.c > > 2d53139f David Mosberger 2014-04-28 1691 > 2d53139f David Mosberger 2014-04-28 1692 static int > 2d53139f David Mosberger 2014-04-28 1693 max3421_hub_control(struct usb_hcd *hcd, u16 type_req, u16 value, u16 index, > 2d53139f David Mosberger 2014-04-28 1694 char *buf, u16 length) > 2d53139f David Mosberger 2014-04-28 1695 { > 2d53139f David Mosberger 2014-04-28 1696 struct spi_device *spi = to_spi_device(hcd->self.controller); > 2d53139f David Mosberger 2014-04-28 1697 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); > 2d53139f David Mosberger 2014-04-28 1698 struct max3421_hcd_platform_data *pdata; > 2d53139f David Mosberger 2014-04-28 1699 unsigned long flags; > 2d53139f David Mosberger 2014-04-28 1700 int retval = 0; > 2d53139f David Mosberger 2014-04-28 1701 > 2d53139f David Mosberger 2014-04-28 @1702 spin_lock_irqsave(&max3421_hcd->lock, flags); > 2d53139f David Mosberger 2014-04-28 1703 > 2d53139f David Mosberger 2014-04-28 1704 pdata = spi->dev.platform_data; > 721fdc83 Jules Maselbas 2017-09-15 1705 if (!pdata) { > 721fdc83 Jules Maselbas 2017-09-15 1706 dev_err(&spi->dev, "Device platform data is missing\n"); > 721fdc83 Jules Maselbas 2017-09-15 @1707 return -EFAULT; > 721fdc83 Jules Maselbas 2017-09-15 1708 } > 2d53139f David Mosberger 2014-04-28 1709 > 2d53139f David Mosberger 2014-04-28 1710 switch (type_req) { > 2d53139f David Mosberger 2014-04-28 1711 case ClearHubFeature: > 2d53139f David Mosberger 2014-04-28 1712 break; > 2d53139f David Mosberger 2014-04-28 1713 case ClearPortFeature: > 2d53139f David Mosberger 2014-04-28 1714 switch (value) { > 2d53139f David Mosberger 2014-04-28 1715 case USB_PORT_FEAT_SUSPEND: > 2d53139f David Mosberger 2014-04-28 1716 break; > 2d53139f David Mosberger 2014-04-28 1717 case USB_PORT_FEAT_POWER: > 2d53139f David Mosberger 2014-04-28 1718 dev_dbg(hcd->self.controller, "power-off\n"); > 4055e5e5 David Mosberger-Tang 2014-05-29 1719 max3421_gpout_set_value(hcd, pdata->vbus_gpout, > 4055e5e5 David Mosberger-Tang 2014-05-29 1720 !pdata->vbus_active_level); > 2d53139f David Mosberger 2014-04-28 1721 /* FALLS THROUGH */ > 2d53139f David Mosberger 2014-04-28 1722 default: > 2d53139f David Mosberger 2014-04-28 1723 max3421_hcd->port_status &= ~(1 << value); > 2d53139f David Mosberger 2014-04-28 1724 } > 2d53139f David Mosberger 2014-04-28 1725 break; > 2d53139f David Mosberger 2014-04-28 1726 case GetHubDescriptor: > 2d53139f David Mosberger 2014-04-28 1727 hub_descriptor((struct usb_hub_descriptor *) buf); > 2d53139f David Mosberger 2014-04-28 1728 break; > 2d53139f David Mosberger 2014-04-28 1729 > 2d53139f David Mosberger 2014-04-28 1730 case DeviceRequest | USB_REQ_GET_DESCRIPTOR: > 2d53139f David Mosberger 2014-04-28 1731 case GetPortErrorCount: > 2d53139f David Mosberger 2014-04-28 1732 case SetHubDepth: > 2d53139f David Mosberger 2014-04-28 1733 /* USB3 only */ > 2d53139f David Mosberger 2014-04-28 1734 goto error; > 2d53139f David Mosberger 2014-04-28 1735 > 2d53139f David Mosberger 2014-04-28 1736 case GetHubStatus: > 2d53139f David Mosberger 2014-04-28 1737 *(__le32 *) buf = cpu_to_le32(0); > 2d53139f David Mosberger 2014-04-28 1738 break; > 2d53139f David Mosberger 2014-04-28 1739 > 2d53139f David Mosberger 2014-04-28 1740 case GetPortStatus: > 2d53139f David Mosberger 2014-04-28 1741 if (index != 1) { > 2d53139f David Mosberger 2014-04-28 1742 retval = -EPIPE; > 2d53139f David Mosberger 2014-04-28 1743 goto error; > 2d53139f David Mosberger 2014-04-28 1744 } > 2d53139f David Mosberger 2014-04-28 1745 ((__le16 *) buf)[0] = cpu_to_le16(max3421_hcd->port_status); > 2d53139f David Mosberger 2014-04-28 1746 ((__le16 *) buf)[1] = > 2d53139f David Mosberger 2014-04-28 1747 cpu_to_le16(max3421_hcd->port_status >> 16); > 2d53139f David Mosberger 2014-04-28 1748 break; > 2d53139f David Mosberger 2014-04-28 1749 > 2d53139f David Mosberger 2014-04-28 1750 case SetHubFeature: > 2d53139f David Mosberger 2014-04-28 1751 retval = -EPIPE; > 2d53139f David Mosberger 2014-04-28 1752 break; > 2d53139f David Mosberger 2014-04-28 1753 > 2d53139f David Mosberger 2014-04-28 1754 case SetPortFeature: > 2d53139f David Mosberger 2014-04-28 1755 switch (value) { > 2d53139f David Mosberger 2014-04-28 1756 case USB_PORT_FEAT_LINK_STATE: > 2d53139f David Mosberger 2014-04-28 1757 case USB_PORT_FEAT_U1_TIMEOUT: > 2d53139f David Mosberger 2014-04-28 1758 case USB_PORT_FEAT_U2_TIMEOUT: > 2d53139f David Mosberger 2014-04-28 1759 case USB_PORT_FEAT_BH_PORT_RESET: > 2d53139f David Mosberger 2014-04-28 1760 goto error; > 2d53139f David Mosberger 2014-04-28 1761 case USB_PORT_FEAT_SUSPEND: > 2d53139f David Mosberger 2014-04-28 1762 if (max3421_hcd->active) > 2d53139f David Mosberger 2014-04-28 1763 max3421_hcd->port_status |= > 2d53139f David Mosberger 2014-04-28 1764 USB_PORT_STAT_SUSPEND; > 2d53139f David Mosberger 2014-04-28 1765 break; > 2d53139f David Mosberger 2014-04-28 1766 case USB_PORT_FEAT_POWER: > 2d53139f David Mosberger 2014-04-28 1767 dev_dbg(hcd->self.controller, "power-on\n"); > 2d53139f David Mosberger 2014-04-28 1768 max3421_hcd->port_status |= USB_PORT_STAT_POWER; > 4055e5e5 David Mosberger-Tang 2014-05-29 1769 max3421_gpout_set_value(hcd, pdata->vbus_gpout, > 4055e5e5 David Mosberger-Tang 2014-05-29 1770 pdata->vbus_active_level); > 2d53139f David Mosberger 2014-04-28 1771 break; > 2d53139f David Mosberger 2014-04-28 1772 case USB_PORT_FEAT_RESET: > 2d53139f David Mosberger 2014-04-28 1773 max3421_reset_port(hcd); > 2d53139f David Mosberger 2014-04-28 1774 /* FALLS THROUGH */ > 2d53139f David Mosberger 2014-04-28 1775 default: > 2d53139f David Mosberger 2014-04-28 1776 if ((max3421_hcd->port_status & USB_PORT_STAT_POWER) > 2d53139f David Mosberger 2014-04-28 1777 != 0) > 2d53139f David Mosberger 2014-04-28 1778 max3421_hcd->port_status |= (1 << value); > 2d53139f David Mosberger 2014-04-28 1779 } > 2d53139f David Mosberger 2014-04-28 1780 break; > 2d53139f David Mosberger 2014-04-28 1781 > 2d53139f David Mosberger 2014-04-28 1782 default: > 2d53139f David Mosberger 2014-04-28 1783 dev_dbg(hcd->self.controller, > 2d53139f David Mosberger 2014-04-28 1784 "hub control req%04x v%04x i%04x l%d\n", > 2d53139f David Mosberger 2014-04-28 1785 type_req, value, index, length); > 2d53139f David Mosberger 2014-04-28 1786 error: /* "protocol stall" on error */ > 2d53139f David Mosberger 2014-04-28 1787 retval = -EPIPE; > 2d53139f David Mosberger 2014-04-28 1788 } > 2d53139f David Mosberger 2014-04-28 1789 > 2d53139f David Mosberger 2014-04-28 1790 spin_unlock_irqrestore(&max3421_hcd->lock, flags); > 2d53139f David Mosberger 2014-04-28 1791 return retval; > 2d53139f David Mosberger 2014-04-28 1792 } > 2d53139f David Mosberger 2014-04-28 1793 > Yes, Jules, please fix this. thanks, greg k-h -- 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