Gerd Hoffmann writes:
>> static void usb_mtp_object_free(MTPState *s, MTPObject *o)
>> {
>> -int i;
>> +MTPObject *iter;
>> +
>> +if (o) {
>> +trace_usb_mtp_object_free(s->dev.addr, o->handle, o->path);
>
> That also makes usb_mtp_object_free callable with o == NULL. Makes
> static void usb_mtp_object_free(MTPState *s, MTPObject *o)
> {
> -int i;
> +MTPObject *iter;
> +
> +if (o) {
> +trace_usb_mtp_object_free(s->dev.addr, o->handle, o->path);
That also makes usb_mtp_object_free callable with o == NULL. Makes
sense, but also makes this patch h
To support adding/removal of objects, we will need to update
the object cache hierarchy we have built internally. Convert
to using a Qlist for easier management.
Signed-off-by: Bandan Das
---
hw/usb/dev-mtp.c | 67 +---
trace-events | 1 +