Skip to contentSkip to conversation

usb: isp1760: add support for isp1763

bug report Dan Carpenter 1 participant 1 message Jul 26, 2021 USB

lore
Share & tools
lore
#0 lore raw

Hello Rui Miguel Silva,

The patch 60d789f3bfbb: "usb: isp1760: add support for isp1763" from May 13, 2021, leads to the following static checker warning:

	drivers/usb/isp1760/isp1760-hcd.c:276 isp1760_hcd_clear_and_wait()
	warn: sleeping in atomic context

drivers/usb/isp1760/isp1760-hcd.c

    268 static int isp1760_hcd_clear_and_wait(struct usb_hcd *hcd, u32 field,
    269 				      u32 timeout_us)
    270 {
    271 	struct isp1760_hcd *priv = hcd_to_priv(hcd);
    272 	u32 val;
    273 
    274 	isp1760_hcd_clear(hcd, field);
    275 
--> 276 	return regmap_field_read_poll_timeout(priv->fields[field], val,
    277 					      !val, 10, timeout_us);
                                                            ^^

Originally this used to call read_poll_timeout() with 0 us_timeout (no sleeping). The caller always holds a spin_lock.

    278 }

regards,
dan carpenter