From: Bandan Das <bsd@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 3/5] usb-mtp: Support delete of mtp objects
Date: Tue, 13 Feb 2018 14:35:59 -0500 [thread overview]
Message-ID: <jpgbmgsfzs0.fsf@linux.bootlegged.copy> (raw)
In-Reply-To: <20180213120722.3td5agrejd2t7hbo@sirius.home.kraxel.org> (Gerd Hoffmann's message of "Tue, 13 Feb 2018 13:07:22 +0100")
Gerd Hoffmann <kraxel@redhat.com> writes:
>> +#ifndef CONFIG_INOTIFY1
>> +/* Assumes that children, if any, have been already freed */
>> +static void usb_mtp_object_free_one(MTPState *s, MTPObject *o)
>> +{
>> + assert(o->nchildren == 0);
>> + QTAILQ_REMOVE(&s->objects, o, next);
>> + g_free(o->name);
>> + g_free(o->path);
>> + g_free(o);
>> +}
>> +#endif
>
> I'd suggest to move the #ifdef into the function, so it can be called
> unconditinally. Also #else /* not needed with inotify because ... */
> would be nice.
>
>> +#ifndef CONFIG_INOTIFY1
>> + usb_mtp_object_free_one(s, o);
>> +#endif
>
> These ifdefs can be dropped then.
>
>> + /* Mark store as RW */
>> + s->flags |= (1 << MTP_FLAG_WRITABLE);
>
> Do we want a property to enable write support?
Good idea, I will add one and set it to enabled by default.
Bandan
> cheers,
> Gerd
next prev parent reply other threads:[~2018-02-13 19:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 22:27 [Qemu-devel] [PATCH v2 0/5] Initial write support for MTP object Bandan Das
2018-02-12 22:27 ` [Qemu-devel] [PATCH v2 1/5] usb-mtp: Add one more argument when building results Bandan Das
2018-02-12 22:27 ` [Qemu-devel] [PATCH v2 2/5] usb-mtp: print parent path in IN_IGNORED trace fn Bandan Das
2018-02-12 22:27 ` [Qemu-devel] [PATCH v2 3/5] usb-mtp: Support delete of mtp objects Bandan Das
2018-02-13 12:07 ` Gerd Hoffmann
2018-02-13 19:35 ` Bandan Das [this message]
2018-02-12 22:27 ` [Qemu-devel] [PATCH v2 4/5] usb-mtp: Introduce write support for MTP objects Bandan Das
2018-02-13 12:10 ` Gerd Hoffmann
2018-02-12 22:27 ` [Qemu-devel] [PATCH v2 5/5] usb-mtp: Advertise SendObjectInfo for write support Bandan Das
2018-02-13 12:20 ` Gerd Hoffmann
2018-02-13 19:38 ` Bandan Das
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jpgbmgsfzs0.fsf@linux.bootlegged.copy \
--to=bsd@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).