From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtf1i-00035p-J7 for qemu-devel@nongnu.org; Wed, 26 Nov 2014 11:01:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xtf1d-0002FZ-LD for qemu-devel@nongnu.org; Wed, 26 Nov 2014 11:01:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtf1d-0002FT-CX for qemu-devel@nongnu.org; Wed, 26 Nov 2014 11:01:05 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAQG146E012136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 26 Nov 2014 11:01:04 -0500 Message-ID: <5475F93F.8050704@redhat.com> Date: Wed, 26 Nov 2014 09:01:03 -0700 From: Eric Blake MIME-Version: 1.0 References: <1416944800-17919-1-git-send-email-jsnow@redhat.com> <1416944800-17919-6-git-send-email-jsnow@redhat.com> <5475CAF1.9070603@redhat.com> In-Reply-To: <5475CAF1.9070603@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="p5LRc2na60ckXBVGv4AaRSueSxvKl7xC8" Subject: Re: [Qemu-devel] [2.3 PATCH v7 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , John Snow , qemu-devel@nongnu.org Cc: Fam Zheng This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --p5LRc2na60ckXBVGv4AaRSueSxvKl7xC8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/26/2014 05:43 AM, Max Reitz wrote: > On 2014-11-25 at 20:46, John Snow wrote: >> From: Fam Zheng >> >> Signed-off-by: Fam Zheng >> Signed-off-by: John Snow >> --- >> block.c | 35 +++++++++++++++++++++++++++++++---- >> include/block/block.h | 4 ++++ >> 2 files changed, 35 insertions(+), 4 deletions(-) >> >> @@ -5406,7 +5431,9 @@ int64_t >> bdrv_dbm_calc_def_granularity(BlockDriverState *bs) >> int64_t bdrv_dirty_bitmap_granularity(BlockDriverState *bs, >> BdrvDirtyBitmap *bitmap) >> { >> - return BDRV_SECTOR_SIZE << hbitmap_granularity(bitmap->bitmap); >> + g_assert(BDRV_SECTOR_SIZE << hbitmap_granularity(bitmap->bitmap) >> =3D=3D \ >> + bitmap->granularity); >=20 > Do you really need that backslash? >=20 > If you don't and remove it, or if you do and keep it, and with either > "name ? g_strdup(name) : NULL" left as-is or replace by "g_strdup(name)= ": >=20 g_strdup(NULL) is safe, so 'name ? g_strdup(name) : NULL' is pointless and can be written as 'g_strdup(name)' with no change in functionality. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --p5LRc2na60ckXBVGv4AaRSueSxvKl7xC8 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 iQEcBAEBCAAGBQJUdfk/AAoJEKeha0olJ0NqtI0H/RdqRRxJtWUmlNpDSwXI00n8 GkGBQ46l5m+Ow9tlUDP275LAHp5A9misbtSJTsN7v1Uqjh5iNVELpLj3OstuKtdH 2vgUAH4MFquZsYpCpnmqV56oUct16A6DCQ0A8k7BVBcR0uUilDqWE/ae6ftqOF4P sYLf5J9JC4MGr4QkXteif++1A3wHhjCyd73OgQoPmiQC6qzL10GxeOD6Mse5OYWA VNZXypbg9m4dCFE8+/RC+l/S92zACRbJpu5avL38DWE4t93YWS6ibgp3IRT2VUaM sMxWi281MHBb7q7R5H1jatbZcM78w0cbbYIaho0gE3bVYCO8Yz74qq3TtAhOxVo= =Eclu -----END PGP SIGNATURE----- --p5LRc2na60ckXBVGv4AaRSueSxvKl7xC8--