All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: "Daniel P. Berrange" <berrange@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: Pavel Fedin <p.fedin@samsung.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL for-2.5 00/10] QOM devices patch queue 2015-11-18
Date: Thu, 19 Nov 2015 15:09:47 +0100	[thread overview]
Message-ID: <564DD82B.5070203@suse.de> (raw)
In-Reply-To: <20151119115359.GD9247@redhat.com>

Am 19.11.2015 um 12:53 schrieb Daniel P. Berrange:
> On Thu, Nov 19, 2015 at 10:54:15AM +0000, Peter Maydell wrote:
>> On 18 November 2015 at 20:39, Andreas Färber <afaerber@suse.de> wrote:
>>> Hello Peter,
>>>
>>> This is my late QOM (devices) patch queue. Please pull.
>>>
>>> Regards,
>>> Andreas
>>>
>>> Cc: Peter Maydell <peter.maydell@linaro.org>
>>> Cc: Daniel P. Berrange <berrange@redhat.com>
>>> Cc: Pavel Fedin <p.fedin@samsung.com>
>>>
>>> The following changes since commit 74fcbd22d20a2fbc1a47a7b00cce5bf98fd7be5f:
>>>
>>>   hw/misc: Add support for ADC controller in Xilinx Zynq 7000 (2015-11-12 21:30:42 +0000)
>>>
>>> are available in the git repository at:
>>>
>>>   git://github.com/afaerber/qemu-cpu.git tags/qom-devices-for-peter
>>>
>>> for you to fetch changes up to c5760450796433621ccdc125866a84b892e2d5b6:
>>>
>>>   MAINTAINERS: Add check-qom-{interface,proplist} to QOM (2015-11-18 21:13:50 +0100)
>>>
>>> ----------------------------------------------------------------
>>> QOM infrastructure fixes and device conversions
>>>
>>> * Fix for properties on objects > 4 GiB
>>> * Performance improvements for QOM property handling
>>> * Assertion cleanups
>>> * MAINTAINERS additions
>>
>> Hi. Unfortunately this doesn't build with our minimum supported
>> glib version:
>>
>> /Users/pm215/src/qemu-for-merges/qom/object.c:921:9: warning: implicit
>> declaration of function 'g_hash_table_contains' is invalid in C99
>> [-Wimplicit-function-declaration]
>>     if (g_hash_table_contains(obj->properties, name)) {
>>         ^
>>
>> g_hash_table_contains was only introduced in glib 2.32.
> 
> Since we never store NULL as a valid value in the hash tble, we
> can simply replace this with g_hash_table_lookup instead

Seems to work fine, too:

diff --git a/qom/object.c b/qom/object.c
index 19e7561..ff34c86 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -918,7 +918,7 @@ object_property_add(Object *obj, const char *name,
const char *type,
         return ret;
     }

-    if (g_hash_table_contains(obj->properties, name)) {
+    if (g_hash_table_lookup(obj->properties, name) != NULL) {
         error_setg(errp, "attempt to add duplicate property '%s'"
                        " to object (type '%s')", name,
                        object_get_typename(obj));

Will respin.

Thanks,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)

  reply	other threads:[~2015-11-19 14:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 20:39 [Qemu-devel] [PULL for-2.5 00/10] QOM devices patch queue 2015-11-18 Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 01/10] qdev: Change Property::offset field to ptrdiff_t type Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 02/10] qom: Introduce ObjectPropertyIterator struct for iteration Andreas Färber
2015-11-19  9:20   ` Markus Armbruster
2015-11-19  9:25     ` Daniel P. Berrange
2015-11-19  9:49       ` Markus Armbruster
2015-11-19 10:24     ` Andreas Färber
2015-11-19 13:42       ` Markus Armbruster
2015-11-18 20:39 ` [Qemu-devel] [PULL 03/10] qmp: Convert QMP code to use object property iterators Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 04/10] vl: Convert machine help " Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 05/10] ppc: Convert spapr " Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 06/10] net: Convert net filter " Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 07/10] qom: Add a test case for complex property finalization Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 08/10] qom: Replace object property list with GHashTable Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 09/10] qom: Clean up assertions to display values on failure Andreas Färber
2015-11-18 20:39 ` [Qemu-devel] [PULL 10/10] MAINTAINERS: Add check-qom-{interface, proplist} to QOM Andreas Färber
2015-11-19 13:55   ` Daniel P. Berrange
2015-11-19 13:58   ` Igor Mammedov
2015-11-19 10:54 ` [Qemu-devel] [PULL for-2.5 00/10] QOM devices patch queue 2015-11-18 Peter Maydell
2015-11-19 11:53   ` Daniel P. Berrange
2015-11-19 14:09     ` Andreas Färber [this message]
2015-11-19 14:13       ` Daniel P. Berrange
  -- strict thread matches above, loose matches on Subject: below --
2015-11-18 20:22 Andreas Färber

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=564DD82B.5070203@suse.de \
    --to=afaerber@suse.de \
    --cc=berrange@redhat.com \
    --cc=p.fedin@samsung.com \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.