From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8I7m-0001eB-Gy for qemu-devel@nongnu.org; Sun, 13 Dec 2015 20:40:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8I7l-0004U6-5R for qemu-devel@nongnu.org; Sun, 13 Dec 2015 20:40:26 -0500 Date: Mon, 14 Dec 2015 12:28:43 +1100 From: David Gibson Message-ID: <20151214012843.GL22783@voom.fritz.box> References: <1449792685-17000-1-git-send-email-david@gibson.dropbear.id.au> <1449792685-17000-12-git-send-email-david@gibson.dropbear.id.au> <566AEA53.9090009@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tv2SIFopg1r47n4a" Content-Disposition: inline In-Reply-To: <566AEA53.9090009@redhat.com> Subject: Re: [Qemu-devel] [PATCH 11/11] pseries: Clean up error reporting in htab migration functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, armbru@redhat.com, agraf@suse.de, qemu-ppc@nongnu.org --tv2SIFopg1r47n4a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 11, 2015 at 08:22:59AM -0700, Eric Blake wrote: > On 12/10/2015 05:11 PM, David Gibson wrote: > > The functions for migrating the hash page table on pseries machine type > > (htab_save_setup() and htab_load()) can report some errors with an > > explicit fprintf() before returning an appropriate eror code. Change t= hese > > to use error_report() instead. > >=20 > > Signed-off-by: David Gibson > > --- > > hw/ppc/spapr.c | 17 +++++++++-------- > > 1 file changed, 9 insertions(+), 8 deletions(-) > >=20 >=20 > > =20 > > @@ -1577,9 +1578,9 @@ static int htab_load(QEMUFile *f, void *opaque, i= nt version_id) > > if ((index + n_valid + n_invalid) > > > (HTAB_SIZE(spapr) / HASH_PTE_SIZE_64)) { > > /* Bad index in stream */ > > - fprintf(stderr, "htab_load() bad index %d (%hd+%hd entries= ) " > > - "in htab stream (htab_shift=3D%d)\n", index, n_val= id, n_invalid, > > - spapr->htab_shift); > > + error_report( > > + "htab_load() bad index %d (%hd+%hd entries) in htab st= ream (htab_shift=3D%d)\n", > > + index, n_valid, n_invalid, spapr->htab_shift); >=20 > No trailing newline to error_report(). Thanks. Changed that in most of the places I removed fprintf(), but missed this one. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --tv2SIFopg1r47n4a Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWbhtLAAoJEGw4ysog2bOScUIQAJj+NZBqWf/UVcV0xmPIPdoA 4qS510bImGaCsl6gFDv5xnWS908UrakV5ocjdRVsbbxYqKdiDbAQh1nF5vwMVH/V UBIwsSjVz10ntNVaDzFncXsAu9ujXh3CSLqI8DF48gHMPoAv3DpokzthC3i2hlna 5cITa98zzjOZUwNhZHg4GdRXkC6HprzZcjEYZoM+FZ72xVr+ZU3zomL1iMZGIJbi oX4kn9euWj1IEWbHCUjUTRtfav6Ro7NcZbzwSwaEh1U8aJdcy/3UF8qyjv9jfVek FXohSFJG98THMtKeuRixEESsyQ6FXvZZR/gMxryPVXQ9rEAgYlUX1WAc2fOwxyjf 2aRr+43maJBC++bScQP8WI8Wzb2RJacAyXaN1b9WNSbkuvwT+JHTLQXsBijsrC3Y TeCF178U2k0vsUxERy+if6ybwK5fdnPTRBZQxIaR3KRK+0NURoVx6yevU+AFEZoN YtBLeqwGa3FcuRM/J7LHulN95aptERcRBPEw+ErhQlAY3mg92W7z/E+eTNLDcLoq xIJd6EOFogdAI0jqYRQM0YJM3z+kw1wFgCJxh1yY8SwIfbxZGztBUIT7b0rczRiV CW1xUI/373wXvfBvqUI2ojScEnwt4r8n/bemWRbHOlNl0l+dnRCyrQQjpVtx5jS3 NihJnn8U+7BXaXh9Og0X =sHhO -----END PGP SIGNATURE----- --tv2SIFopg1r47n4a--