qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState memb


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState member device_name[]
Date: Tue, 16 Sep 2014 19:39:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> Il 16/09/2014 16:08, Markus Armbruster ha scritto:
>>>> >> +    if (bs->device_list.tqe_prev) {
>>>> >>          QTAILQ_REMOVE(&bdrv_states, bs, device_list);
>>>> >> +        bs->device_list.tqe_prev = NULL;
>>> >
>>> > I think a comments explaining the trick you are doing here would be 
>>> > worthy:
>>> > after all you are touching directly the inner parts of a linked list and
>>> > bypassing the list API.
>> Fair enough.
>
> Or just add tqe_prev = NULL to QTAILQ_REMOVE.

And add a QTAILQ_IN_ANY_QUEUE() macro, so I get rid of both .tqe_prev
uses.  I'll consider it, but either in v4 or as a follow-up patch,
because I want to grep the source for similar trickery.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]