From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= Subject: Re: [PATCH v4 4/5] util: [ppc] Use new error_report_abort() instead of abort() Date: Thu, 28 Jan 2016 23:16:35 +0100 Message-ID: <8737thtkn0.fsf@fimbulvetr.bsc.es> References: <145401727502.31479.11571397180565966513.stgit@localhost> <145401729734.31479.15887562149880928240.stgit@localhost> <56AA8C16.3090602@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , "Dr . David Alan Gilbert" , Thomas Huth , Markus Armbruster , Alexander Graf , Paolo Bonzini , "open list\:PowerPC" , "open list\:Overall" To: Eric Blake Return-path: Received: from roura.ac.upc.edu ([147.83.33.10]:55835 "EHLO roura.ac.upc.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965255AbcA1WQl convert rfc822-to-8bit (ORCPT ); Thu, 28 Jan 2016 17:16:41 -0500 In-Reply-To: <56AA8C16.3090602@redhat.com> (Eric Blake's message of "Thu, 28 Jan 2016 14:45:58 -0700") Sender: kvm-owner@vger.kernel.org List-ID: Eric Blake writes: > On 01/28/2016 02:41 PM, Llu=C3=ADs Vilanova wrote: >> Signed-off-by: Llu=C3=ADs Vilanova >> --- >> target-ppc/kvm.c | 4 ++-- >> target-ppc/kvm_ppc.h | 15 +++++++++------ >> target-ppc/mmu-hash32.c | 5 +++-- >> target-ppc/mmu_helper.c | 3 +-- >> 4 files changed, 15 insertions(+), 12 deletions(-) >>=20 >> +++ b/target-ppc/kvm_ppc.h >> @@ -9,6 +9,9 @@ >> #ifndef __KVM_PPC_H__ >> #define __KVM_PPC_H__ >>=20 >> +#include "qemu/error-report.h" >> + >> + >> #define TYPE_HOST_POWERPC_CPU "host-" TYPE_POWERPC_CPU >>=20 >> #ifdef CONFIG_KVM >> @@ -220,36 +223,36 @@ static inline int kvmppc_get_htab_fd(bool writ= e) >> static inline int kvmppc_save_htab(QEMUFile *f, int fd, size_t bufsi= ze, >> int64_t max_ns) >> { >> - abort(); >> + error_report_abort(" "); > Aborting with an empty string with trailing spaces feels awkward. > Either this should be a real message, or abort() was just fine. See my other mail for why (I think) it makes sense to abort without an additional message. Also, an empty string makes gcc grumpy with a warni= ng. Cheers, Lluis From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOurr-0001nV-DU for qemu-devel@nongnu.org; Thu, 28 Jan 2016 17:16:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOurq-0001i6-Ju for qemu-devel@nongnu.org; Thu, 28 Jan 2016 17:16:43 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <145401727502.31479.11571397180565966513.stgit@localhost> <145401729734.31479.15887562149880928240.stgit@localhost> <56AA8C16.3090602@redhat.com> Date: Thu, 28 Jan 2016 23:16:35 +0100 In-Reply-To: <56AA8C16.3090602@redhat.com> (Eric Blake's message of "Thu, 28 Jan 2016 14:45:58 -0700") Message-ID: <8737thtkn0.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 4/5] util: [ppc] Use new error_report_abort() instead of abort() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Thomas Huth , "open list:Overall" , Stefan Hajnoczi , Alexander Graf , qemu-devel@nongnu.org, "open list:PowerPC" , "Dr . David Alan Gilbert" , Paolo Bonzini , Markus Armbruster Eric Blake writes: > On 01/28/2016 02:41 PM, Llu=C3=ADs Vilanova wrote: >> Signed-off-by: Llu=C3=ADs Vilanova >> --- >> target-ppc/kvm.c | 4 ++-- >> target-ppc/kvm_ppc.h | 15 +++++++++------ >> target-ppc/mmu-hash32.c | 5 +++-- >> target-ppc/mmu_helper.c | 3 +-- >> 4 files changed, 15 insertions(+), 12 deletions(-) >>=20 >> +++ b/target-ppc/kvm_ppc.h >> @@ -9,6 +9,9 @@ >> #ifndef __KVM_PPC_H__ >> #define __KVM_PPC_H__ >>=20 >> +#include "qemu/error-report.h" >> + >> + >> #define TYPE_HOST_POWERPC_CPU "host-" TYPE_POWERPC_CPU >>=20 >> #ifdef CONFIG_KVM >> @@ -220,36 +223,36 @@ static inline int kvmppc_get_htab_fd(bool write) >> static inline int kvmppc_save_htab(QEMUFile *f, int fd, size_t bufsize, >> int64_t max_ns) >> { >> - abort(); >> + error_report_abort(" "); > Aborting with an empty string with trailing spaces feels awkward. > Either this should be a real message, or abort() was just fine. See my other mail for why (I think) it makes sense to abort without an additional message. Also, an empty string makes gcc grumpy with a warning. Cheers, Lluis