From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN6Fu-00042f-1X for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:53:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN6Fp-000092-LR for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:52:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN6Fp-00008t-CB for qemu-devel@nongnu.org; Mon, 10 Mar 2014 15:52:53 -0400 Message-ID: <531E1811.5050002@redhat.com> Date: Mon, 10 Mar 2014 13:52:49 -0600 From: Eric Blake MIME-Version: 1.0 References: <1394436721-21812-1-git-send-email-cyliu@suse.com> <1394436721-21812-2-git-send-email-cyliu@suse.com> In-Reply-To: <1394436721-21812-2-git-send-email-cyliu@suse.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f3v9LWRLcsnWSokIvQvX2t4hGdwjeX4OR" Subject: Re: [Qemu-devel] [PATCH v22 01/25] add def_value_str to QemuOptDesc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chunyan Liu , qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --f3v9LWRLcsnWSokIvQvX2t4hGdwjeX4OR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/10/2014 01:31 AM, Chunyan Liu wrote: > Add def_value_str (default value) to QemuOptDesc, to replace function o= f the > default value in QEMUOptionParameter. And improved related functions. >=20 > Signed-off-by: Dong Xu Wang > Signed-off-by: Chunyan Liu > --- > include/qemu/option.h | 3 ++- > util/qemu-option.c | 59 +++++++++++++++++++++++++++++++++++++++++++= -------- > 2 files changed, 52 insertions(+), 10 deletions(-) >=20 > +++ b/util/qemu-option.c > @@ -33,6 +33,9 @@ > #include "qapi/qmp/qerror.h" > #include "qemu/option_int.h" > =20 > +static const QemuOptDesc *find_desc_by_name(const QemuOptDesc *desc, > + const char *name); I tend to avoid forward-declaration of static functions, except when true mutual recursion is required - when I read a file, it's nicer to see the smaller building blocks up front instead of having to skip to the bottom to see what they do. Do you need a forward-declaration, or can you split this into two patches, one that does just code motion to hoist find_desc_by_name() earlier, and the second to make use of it in correct topological order? But what you have is correct, so if you don't have a reason to respin for anything else, Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --f3v9LWRLcsnWSokIvQvX2t4hGdwjeX4OR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTHhgRAAoJEKeha0olJ0NqSqMH/RWsZu2mY2v59xSbPB5lm6mk oxIlaj5t6Ge7epB1TG6nxN/Du/1bKuHEWkGGxntO6ciuEMyYYwW6phviBOzZtuRX j3wE6ayrvJscMqzM/K2SG7ZRGNIEInsj139TD0vhJHBDpQ6wFL+WUjDQZzRvSaur Lnv6U0+ybKfhDHOn+tbdMvvWQ+iJfcgyuKj+4zT5/rYSOLIWjhxrYQqbkFTVYe+0 U5491gdOXIw0Jcv5fAkQzf62jfx90e70m6MnTa0fqZSlJ1HEEAW0JI2IMlO7CwAb C0VdKCqWd4bWpQAglRUh0eAaeSIERR7TZH8mSH9Fne5YOrmv0QFJjG8mOlB9LAU= =ijSr -----END PGP SIGNATURE----- --f3v9LWRLcsnWSokIvQvX2t4hGdwjeX4OR--