[U-Boot] [PATCH v2 1/3] usb:gadget:composite USB composite gadget support

Lukasz Majewski l.majewski at samsung.com
Tue Apr 17 14:45:47 CEST 2012


Hi Marek,


> 
> > +int usb_string_ids_n(struct usb_composite_dev *c, unsigned n)
> > +{
> > +	unsigned next = c->next_string_id;
> > +	if (unlikely(n > 254 || (unsigned)next + n > 254))
> 
> This unlikely() call is unlikely part of uboot :)
> 

Nope, but will be removed :-)

> 
> > +
> > +static void composite_unbind(struct usb_gadget *gadget)
> > +{
> > +	struct usb_composite_dev	*cdev =
> > get_gadget_data(gadget); +
> > +	/*
> > +	 * composite_disconnect() must already have been called
> > +	 * by the underlying peripheral controller driver!
> > +	 * so there's no i/o concurrency that could affect the
> > +	 * state protected by cdev->lock.
> > +	 */
> > +	BUG_ON(cdev->config);
> 
> Do we have BUG_ON() defined in uboot ?

It is defined at include/common.h

But it can be removed if you wish.


> 
> I think this patch is getting much better ;-)
> 
Nice to hear :-)



-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group


More information about the U-Boot mailing list