> -----Original Message-----
> From: Gerd Hoffmann [mailto:kra...@redhat.com]
> Sent: Monday, June 02, 2014 3:36 PM
> To: Gonglei (Arei)
> Cc: qemu-devel@nongnu.org; Luonengjun; Huangweidong (C); Huangpeng
> (Peter)
> Subject: Re: [PATCH 1/6] usb: add usb_bus_release function
> 
>   Hi,
> 
> > +void usb_bus_release(USBBus *bus)
> > +{
> > +    assert(next_usb_bus > 0);
> > +
> > +    next_usb_bus--;
> > +    QTAILQ_REMOVE(&busses, bus, next);
> > +}
> 
> That breaks when not hotplugging in last-in-first-out order.  I'd
> suggest to simply leave next_usb_bus alone on unplug.  It is only used
> for bus numbering.  We'll get holes in our bus numbering then, but we
> can't avoid that with hotplug anyway.
> 
Indeed. Thanks!


Best regards,
-Gonglei


Reply via email to