From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfp2C-0004d3-Al for qemu-devel@nongnu.org; Wed, 08 Apr 2015 08:24:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yfp29-0006DW-Kz for qemu-devel@nongnu.org; Wed, 08 Apr 2015 08:24:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfp29-0006DN-EH for qemu-devel@nongnu.org; Wed, 08 Apr 2015 08:24:41 -0400 Message-ID: <55251E03.3040302@redhat.com> Date: Wed, 08 Apr 2015 14:24:35 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1428439603-8549-1-git-send-email-ehabkost@redhat.com> <1428439603-8549-4-git-send-email-ehabkost@redhat.com> <20150408133629.1b174c2b@nial.brq.redhat.com> <20150408122013.GS7031@thinpad.lan.raisama.net> In-Reply-To: <20150408122013.GS7031@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/6] target-i386: Register QOM properties for feature flags List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , Igor Mammedov Cc: Jiri Denemark , qemu-devel@nongnu.org, =?windows-1252?Q?Andreas_F=E4rber?= On 08/04/2015 14:20, Eduardo Habkost wrote: >> > it would be better to create generic bit property and replace above code with it >> > something similar to object_property_add_uint32_ptr() > object_property_add_*_ptr() adds read-only properties, and I didn't want > to make object_property_add_bit_ptr() inconsistent with the other > functions. But maybe it is better to have an inconsistent but reusable > API than making the new code non-reusable by keeping it inside > target-i386/cpu.c. I will give it a try. add_*_ptr() is read-only because read-only properties do not require validations (at least that's the common case). So I think the inconsistent API is worse than a local one. > BTW, it is on my wishlist to remove the existing duplication in > DEFINE_PROP_*(), QAPI, and object_property_add_*(), that are supposed to > support the same data types without duplicating code, but this may take > a while. Yeah, that would be nice... Paolo