qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] qobject: Update coccinelle s


From: Eric Blake
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/2] qobject: Update coccinelle script to catch Q{INC, DEC}REF
Date: Fri, 9 Jun 2017 10:33:32 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 06/09/2017 10:28 AM, Marc-André Lureau wrote:
> Hi
> 
> On Fri, Jun 9, 2017 at 7:20 PM Eric Blake <address@hidden> wrote:
> 
>> A recent patch submission was about to use qobject_decref(QOBJECT(E)),
>> even though we already have QDECREF(E) for that purpose.  While our
>> tree is currently free from the longhand form, we might as well update
>>
> 
> Oh?
> 
>  $ git grep 'object_unref(OBJECT('  | wc -l
> 152

Quit mixing QOM and QObject ;)

$ git grep qobject_'..cref(QOBJECT'
include/qapi/qmp/qobject.h:    qobject_incref(QOBJECT(obj))
scripts/coccinelle/qobject.cocci:- qobject_incref(QOBJECT(E));
scripts/coccinelle/qobject.cocci:- qobject_decref(QOBJECT(E));

Yes, we may want to add a script to clean QOM abuses, but that's a
different project for a different day.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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