Re: [PATCH 1/7] usb: renesas_usbhs: fixup struct completion usage

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

 



Hi Felipe

Thank you for checking patch

> > -	struct completion	*done;
> > -
> >  	/* see usbhsh_req_alloc/free */
> >  	struct list_head	ureq_link_active;
> >  	struct list_head	ureq_link_free;
> > @@ -522,6 +520,7 @@ static int usbhsh_queue_push(struct usb_hcd *hcd,
> >  /*
> >   *		DCP setup stage
> >   */
> > +static DECLARE_COMPLETION(setup_ack_done);
> 
> are you sure this is wise to do ? What happens if you ever end up with
> two instances of this core on one SoC ?
> 
> I have been fighting a lot against static globals because that's a real
> issue. We never thought there would ever be a device with multiple ports
> but OTG3.0 has dropped the requirement of one port only and we have
> devices (at least one from TI) with two device-side ports (well, those
> ports are OTG-capable, in fact).

Indeed... Thank you for pointing it.
struct usbhsh_hpriv can have it instead of static globals.
I send v2 patch soon.

Best regards
---
Kuninori Morimoto
--
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