From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQWuO-0000Vf-SF for qemu-devel@nongnu.org; Thu, 20 Mar 2014 02:56:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQWuN-0002bS-K0 for qemu-devel@nongnu.org; Thu, 20 Mar 2014 02:56:56 -0400 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:63406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQWuN-0002bL-84 for qemu-devel@nongnu.org; Thu, 20 Mar 2014 02:56:55 -0400 Received: by mail-we0-f173.google.com with SMTP id w61so257814wes.32 for ; Wed, 19 Mar 2014 23:56:53 -0700 (PDT) MIME-Version: 1.0 Sender: kgrace.liu@gmail.com In-Reply-To: <531F2B9F.2010404@redhat.com> References: <1394436721-21812-1-git-send-email-cyliu@suse.com> <1394436721-21812-9-git-send-email-cyliu@suse.com> <531F2B9F.2010404@redhat.com> Date: Thu, 20 Mar 2014 14:56:53 +0800 Message-ID: From: Chunyan Liu Content-Type: multipart/alternative; boundary=047d7beb9b80384b9604f5044681 Subject: Re: [Qemu-devel] [PATCH v22 08/25] cow.c: replace QEMUOptionParameter with QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , Dong Xu Wang , qemu-devel@nongnu.org, Stefan Hajnoczi --047d7beb9b80384b9604f5044681 Content-Type: text/plain; charset=UTF-8 2014-03-11 23:28 GMT+08:00 Eric Blake : > On 03/10/2014 01:31 AM, Chunyan Liu wrote: > > Signed-off-by: Dong Xu Wang > > Signed-off-by: Chunyan Liu > > --- > > block/cow.c | 54 ++++++++++++++++++++++++++---------------------------- > > 1 file changed, 26 insertions(+), 28 deletions(-) > > > > > @@ -414,14 +412,14 @@ static BlockDriver bdrv_cow = { > > .bdrv_probe = cow_probe, > > .bdrv_open = cow_open, > > .bdrv_close = cow_close, > > - .bdrv_create = cow_create, > > + .bdrv_create2 = cow_create, > > .bdrv_has_zero_init = bdrv_has_zero_init_1, > > > > .bdrv_read = cow_co_read, > > .bdrv_write = cow_co_write, > > .bdrv_co_get_block_status = cow_co_get_block_status, > > > > - .create_options = cow_create_options, > > + .create_opts = &cow_create_opts, > > Inconsistent alignment of =, and inconsistent use of & (it is not needed > here, '.create_opts = cow_create_opts' is just fine). > & is needed, since cow_create_opts is a struct, but .create_opts is struct *; It's different from cow_create_options, which is a struct array, .create_options is struct *, so it can simply let the pointer = array name. > > But those are both minor; > > Reviewed-by: Eric Blake > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > > --047d7beb9b80384b9604f5044681 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



2014-03-11 23:28 GMT+08:00 Eric Blake <eblake@redhat.com>:
On 03/10/2014 01:31 AM, Chun= yan Liu wrote:
> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
> Signed-off-by: Chunyan Liu <cyliu= @suse.com>
> ---
> =C2=A0block/cow.c | 54 ++++++++++++++++++++++++++---------------------= -------
> =C2=A01 file changed, 26 insertions(+), 28 deletions(-)
>

> @@ -414,14 +412,14 @@ static BlockDriver bdrv_co= w =3D {
> =C2=A0 =C2=A0 =C2=A0.bdrv_probe =C2=A0 =C2=A0 =3D cow_probe,
> =C2=A0 =C2=A0 =C2=A0.bdrv_open =C2=A0 =C2=A0 =C2=A0=3D cow_open,
> =C2=A0 =C2=A0 =C2=A0.bdrv_close =C2=A0 =C2=A0 =3D cow_close,
> - =C2=A0 =C2=A0.bdrv_create =C2=A0 =C2=A0=3D cow_create,
> + =C2=A0 =C2=A0.bdrv_create2 =C2=A0 =3D cow_create,
> =C2=A0 =C2=A0 =C2=A0.bdrv_has_zero_init =C2=A0 =C2=A0 =3D bdrv_has_zer= o_init_1,
>
> =C2=A0 =C2=A0 =C2=A0.bdrv_read =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0=3D cow_co_read,
> =C2=A0 =C2=A0 =C2=A0.bdrv_write =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =3D cow_co_write,
> =C2=A0 =C2=A0 =C2=A0.bdrv_co_get_block_status =C2=A0 =3D cow_co_get_bl= ock_status,
>
> - =C2=A0 =C2=A0.create_options =3D cow_create_options,
> + =C2=A0 =C2=A0.create_opts =C2=A0 =C2=A0 =C2=A0 =3D &cow_create_o= pts,

Inconsistent alignment of =3D, and inconsistent use of & (it is n= ot needed
here, '.create_opts =3D cow_create_opts' is just fine).

& is needed, since cow_create_opts is a struct= , but .create_opts is struct *;
It's different from cow_c= reate_options, which is a struct array, .create_options
is struct *, so it can simply let the pointer =3D array name.
=C2=A0

But those are both minor;

Reviewed-by: Eric Blake <eblake@red= hat.com>

--
Eric Blake =C2=A0 eblake redhat com =C2=A0 =C2=A0+1-919-301-3266
Libvirt virtualization library http://libvirt.org


--047d7beb9b80384b9604f5044681--