From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yo23c-0007ly-6k for qemu-devel@nongnu.org; Thu, 30 Apr 2015 23:56:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yo23W-0007HY-4L for qemu-devel@nongnu.org; Thu, 30 Apr 2015 23:56:08 -0400 Date: Fri, 1 May 2015 13:42:44 +1000 From: David Gibson Message-ID: <20150501034244.GK24886@voom.redhat.com> References: <1430334068-12772-1-git-send-email-thuth@redhat.com> <1430334068-12772-3-git-send-email-thuth@redhat.com> <5541A235.8060407@ozlabs.ru> <20150430190320.1bd3418e@thh440s> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Tv3+oRj6D9L8lW+H" Content-Disposition: inline In-Reply-To: <20150430190320.1bd3418e@thh440s> Subject: Re: [Qemu-devel] [PATCH 2/2] hw/ppc/spapr: Use error_report() instead of hw_error() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de --Tv3+oRj6D9L8lW+H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 30, 2015 at 07:03:20PM +0200, Thomas Huth wrote: > On Thu, 30 Apr 2015 13:32:05 +1000 > Alexey Kardashevskiy wrote: >=20 > > On 04/30/2015 05:01 AM, Thomas Huth wrote: > > > hw_error() is designed for printing CPU-related error messages > > > (e.g. it also prints a full CPU register dump). For error messages > > > that are not directly related to CPU problems, a function like > > > error_report() should be used instead. > > > > > > Signed-off-by: Thomas Huth > > > --- > > > hw/ppc/spapr.c | 12 ++++++------ > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > > index 226f029..92b1c0b 100644 > > > --- a/hw/ppc/spapr.c > > > +++ b/hw/ppc/spapr.c > > > @@ -794,8 +794,8 @@ static void spapr_finalize_fdt(sPAPREnvironment *= spapr, > > > _FDT((fdt_pack(fdt))); > > > > > > if (fdt_totalsize(fdt) > FDT_MAX_SIZE) { > > > - hw_error("FDT too big ! 0x%x bytes (max is 0x%x)\n", > > > - fdt_totalsize(fdt), FDT_MAX_SIZE); > > > + error_report("FDT too big ! 0x%x bytes (max is 0x%x)", > > > + fdt_totalsize(fdt), FDT_MAX_SIZE); > >=20 > > You did adjust indent here... > >=20 > >=20 > > > exit(1); > > > } > > > > > > @@ -1419,7 +1419,7 @@ static void ppc_spapr_init(MachineState *machin= e) > > > rma_alloc_size =3D kvmppc_alloc_rma(&rma); > > > > > > if (rma_alloc_size =3D=3D -1) { > > > - hw_error("qemu: Unable to create RMA\n"); > > > + error_report("Unable to create RMA"); > > > exit(1); > > > } > > > > > > @@ -1520,17 +1520,17 @@ static void ppc_spapr_init(MachineState *mach= ine) > > > > > > filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, "spapr-rtas.bi= n"); > > > if (!filename) { > > > - hw_error("Could not find LPAR rtas '%s'\n", "spapr-rtas.bin"= ); > > > + error_report("Could not find LPAR rtas '%s'", "spapr-rtas.bi= n"); > > > exit(1); > > > } > > > spapr->rtas_size =3D get_image_size(filename); > > > spapr->rtas_blob =3D g_malloc(spapr->rtas_size); > > > if (load_image_size(filename, spapr->rtas_blob, spapr->rtas_siz= e) < 0) { > > > - hw_error("qemu: could not load LPAR rtas '%s'\n", filename); > > > + error_report("Could not load LPAR rtas '%s'", filename); > > > exit(1); > > > } > > > if (spapr->rtas_size > RTAS_MAX_SIZE) { > > > - hw_error("RTAS too big ! 0x%zx bytes (max is 0x%x)\n", > > > + error_report("RTAS too big ! 0x%zx bytes (max is 0x%x)", > > > (size_t)spapr->rtas_size, RTAS_MAX_SIZE); > >=20 > > ... but not here :) >=20 > Alexey, you're right, of course. >=20 > David, since you already picked up that patch, could you maybe amend > this cosmetic cleanup to my patch? Or shall I send a new version of the > patch or a fixup patch? Amended, thanks. --=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 --Tv3+oRj6D9L8lW+H Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVQvY0AAoJEGw4ysog2bOScw8QAM/kWKIjHC+pJBy7T2FIWBB8 bUN3wSaNXSLN4JD8TCpPV2W56ErkQJLDxgC3+CSmDHbvJY7hEzw/cnF6zdXwlKCf keqc4w2hBshYx+jZ6MFw6ORTgP4HZQ+0+b6bh24v33REQiXCmYyXf+cejPmUEdC/ vYbTMOzGe/r/dsJuF+qnsNHAaYZN+3DZ7nisZUuf4ijsqWRORB5giNKxcGwkBymB vdfAX+BCg9jCPRdi2g0XZGUnpf5MMHR9m4Csh+3wcayi/Tdj7A12uhJtv72tng9g 2eDFkv/8z3xPNZrfqo/J0gCZvRFauwthGOUkPxrge+/VnIjnsop8enMKrB3mDY5q n59fp5aCWCnCg97dtJfeNAyL8h3mTpUgyf+tZCeeSD/FIDa4f3eGduSW8YplhZ9I VVrtjJ75or6BNdOF0MUxOsso+Do4CDxNtVKnWw0i6X7yI0GTCmiwQgrSOrxP83dp QRVnLlZOfYrxnsBwpbFjwfKyRtahLAp1SECSgTaVrwYNv9eUqoG3gQYzJ/q5Oguz 2keUBVa2M3n0pjLr23tFYlVnex80UjLrQRiWO0ASh90krOpAQjX41ZHv61Wzu+DT REdTBX5celmYVaggBd/9eN9kZOUQmfMW3hXEZ51WvDMItNDPmQ38bmeVvGr9K6Rx 7HZox7A6D58I6cyIpUGP =O29O -----END PGP SIGNATURE----- --Tv3+oRj6D9L8lW+H--