From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aihXH-0004yh-OR for qemu-devel@nongnu.org; Wed, 23 Mar 2016 08:05:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aihXC-00057R-1Q for qemu-devel@nongnu.org; Wed, 23 Mar 2016 08:05:15 -0400 Date: Wed, 23 Mar 2016 20:04:49 +0800 From: Peter Xu Message-ID: <20160323120449.GT28183@pxdev.xzpeter.org> References: <1458271654-23706-1-git-send-email-peterx@redhat.com> <1458271654-23706-3-git-send-email-peterx@redhat.com> <874mbyl64i.fsf@blackfin.pond.sub.org> <20160323041429.GG28183@pxdev.xzpeter.org> <87egb1bjxe.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87egb1bjxe.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH v5 2/5] arm: qmp: add query-gic-capabilities interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: wei@redhat.com, peter.maydell@linaro.org, drjones@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, abologna@redhat.com, qemu-arm@nongnu.org On Wed, Mar 23, 2016 at 10:52:29AM +0100, Markus Armbruster wrote: > The rule against returning non-dictionaries exists to avoid interfaces > that cannot evolve. With a dictionary, you can evolve by adding > members. > > The rule does *not* forbid returning lists of dictionaries. When a > command fundamentally returns a list of things, being able to evolve the > things suffices. Ok. > > query-gic-capabilities looks like it fundamentally returns a list of > capabilities. Returning ['GICCapability'] is just fine then. I have posted v6 just as Eric has suggested. At least one advantage is that it is easier to be extended (if needed) in the future, also to follow the more-generic format to use dicts rather than arrays. If you would not mind, I'll keep the dict interface there. [...] > In either case, drop the change to returns_whitelist. Yep. Dropped in v6. Thanks. -- peterx