[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/22] target-i386: cpu_x86_register(): report e
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 02/22] target-i386: cpu_x86_register(): report error from property setter |
Date: |
Wed, 19 Sep 2012 17:01:19 +0200 |
On Thu, 13 Sep 2012 11:40:08 -0300
Eduardo Habkost <address@hidden> wrote:
> On Fri, Sep 07, 2012 at 10:54:51PM +0200, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> > target-i386/cpu.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> > index a89bdc4..3f80069 100644
> > --- a/target-i386/cpu.c
> > +++ b/target-i386/cpu.c
> > @@ -1415,6 +1415,7 @@ int cpu_x86_register(X86CPU *cpu, const char
> > *cpu_model)
> > out:
> > if (error_is_set(&error)) {
>
> Isn't "if (error_is_set(&error)) better written as "if (error)"?
>
> There are lots of places where "error_is_set(&error)" is used, but I saw
> other QEMU code using "if (error)" before, so I don't know what's the
> recommended style.
If there aren't any objections, I'll change it to suggested "if (error)"
style, for the next respin.
>
> Anyway, the point of this patch is to add the error message, not
> cleaning up the existing code. So:
>
> Reviewed-by: Eduardo Habkost <address@hidden>
>
> > + fprintf(stderr, "%s\n", error_get_pretty(error));
> > error_free(error);
> > return -1;
> > }
> > --
> > 1.7.11.4
> >
> >
>
- [Qemu-devel] [PATCH 00/22 v2] target-i386: convert CPU features into properties, Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 01/22] target-i386: return Error from cpu_x86_find_by_name(), Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 02/22] target-i386: cpu_x86_register(): report error from property setter, Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 03/22] target-i386: if x86_cpu_realize() failed report error and do cleanup, Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 04/22] target-i386: filter out not TCG features if running without kvm at realize time, Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 05/22] target-i386: move out CPU features initialization in separate func, Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 07/22] target-i386: convert cpuid features into properties, Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 08/22] target-i386: add stubs for hyperv_(vapic_recommended|relaxed_timing_enabled|get_spinlock_retries)(), Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 10/22] target-i386: convert 'hv_relaxed' feature into property, Igor Mammedov, 2012/09/07
- [Qemu-devel] [PATCH 12/22] target-i386: convert 'check' and 'enforce' features into properties, Igor Mammedov, 2012/09/07