All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk,
	qemu-devel@nongnu.org, blauwirbel@gmail.com, qemu-arm@nongnu.org,
	pbonzini@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH v2 1/6] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr
Date: Thu, 9 Jun 2016 13:39:34 -0600	[thread overview]
Message-ID: <5759C5F6.4020405@redhat.com> (raw)
In-Reply-To: <20160609172900.GV18662@thinpad.lan.raisama.net>

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

On 06/09/2016 11:29 AM, Eduardo Habkost wrote:
> On Thu, Jun 09, 2016 at 07:10:58PM +0200, Igor Mammedov wrote:
> [...]
>> +
>> +    if (local_err) {
>> +        error_propagate(errp, local_err);
>>      }
> 
> error_propagate() already ignores local_err==NULL so you don't
> need to check it first.

In fact, if the ONLY reason you are doing an 'if (local_err)'
conditional is to decide if an error was set, then you don't care about
the error locally, and could have passed errp instead of &local_err in
the first place.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Eric Blake <eblake@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk,
	qemu-devel@nongnu.org, blauwirbel@gmail.com, qemu-arm@nongnu.org,
	pbonzini@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v2 1/6] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr
Date: Thu, 9 Jun 2016 13:39:34 -0600	[thread overview]
Message-ID: <5759C5F6.4020405@redhat.com> (raw)
In-Reply-To: <20160609172900.GV18662@thinpad.lan.raisama.net>

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

On 06/09/2016 11:29 AM, Eduardo Habkost wrote:
> On Thu, Jun 09, 2016 at 07:10:58PM +0200, Igor Mammedov wrote:
> [...]
>> +
>> +    if (local_err) {
>> +        error_propagate(errp, local_err);
>>      }
> 
> error_propagate() already ignores local_err==NULL so you don't
> need to check it first.

In fact, if the ONLY reason you are doing an 'if (local_err)'
conditional is to decide if an error was set, then you don't care about
the error locally, and could have passed errp instead of &local_err in
the first place.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-06-09 19:40 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 17:10 [Qemu-arm] [PATCH v2 0/6] cpus: make "-cpu cpux, features" global properties Igor Mammedov
2016-06-09 17:10 ` [Qemu-devel] " Igor Mammedov
2016-06-09 17:10 ` [Qemu-arm] [PATCH v2 1/6] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr Igor Mammedov
2016-06-09 17:10   ` [Qemu-devel] " Igor Mammedov
2016-06-09 17:29   ` Eduardo Habkost
2016-06-09 17:29     ` Eduardo Habkost
2016-06-09 19:39     ` Eric Blake [this message]
2016-06-09 19:39       ` Eric Blake
2016-06-09 19:50       ` Eduardo Habkost
2016-06-09 19:50         ` Eduardo Habkost
2016-06-10  7:23       ` [Qemu-arm] " Igor Mammedov
2016-06-10  7:23         ` Igor Mammedov
2016-06-10  7:24     ` [Qemu-arm] " Igor Mammedov
2016-06-10  7:24       ` [Qemu-devel] " Igor Mammedov
2016-06-09 17:10 ` [Qemu-arm] [PATCH v2 2/6] target-i386: print obsolete warnings if +-features are used Igor Mammedov
2016-06-09 17:10   ` [Qemu-devel] " Igor Mammedov
2016-06-09 20:22   ` [Qemu-arm] " Eduardo Habkost
2016-06-09 20:22     ` [Qemu-devel] " Eduardo Habkost
2016-06-09 17:11 ` [Qemu-arm] [PATCH v2 3/6] target-sparc: cpu: use sparc_cpu_parse_features() directly Igor Mammedov
2016-06-09 17:11   ` [Qemu-devel] " Igor Mammedov
2016-06-10 11:52   ` Eduardo Habkost
2016-06-10 11:52     ` Eduardo Habkost
2016-06-09 17:11 ` [Qemu-arm] [PATCH v2 4/6] cpu: use CPUClass->parse_features() as convertor to global properties Igor Mammedov
2016-06-09 17:11   ` [Qemu-devel] " Igor Mammedov
2016-06-14 19:47   ` [Qemu-arm] Handling errors caused by -global (was Re: [Qemu-devel] [PATCH v2 4/6] cpu: use CPUClass->parse_features() as convertor to global properties) Eduardo Habkost
2016-06-14 19:47     ` [Qemu-devel] Handling errors caused by -global (was " Eduardo Habkost
2016-06-14 19:47     ` Eduardo Habkost
2016-06-14 21:41     ` [Qemu-arm] Handling errors caused by -global (was Re: [Qemu-devel] " Paolo Bonzini
2016-06-14 21:41       ` [Qemu-devel] Handling errors caused by -global (was " Paolo Bonzini
2016-06-14 21:41       ` Paolo Bonzini
2016-06-14 21:48       ` [Qemu-arm] Handling errors caused by -global (was Re: [Qemu-devel] " Eduardo Habkost
2016-06-14 21:48         ` [Qemu-devel] Handling errors caused by -global (was " Eduardo Habkost
2016-06-14 21:48         ` Eduardo Habkost
2016-06-21 13:24   ` [Qemu-arm] [PATCH v2 4/6] fixup! cpu: use CPUClass->parse_features() as convertor to global properties Igor Mammedov
2016-06-21 13:24     ` [Qemu-devel] " Igor Mammedov
2016-06-23 15:22     ` Eduardo Habkost
2016-06-23 15:22       ` Eduardo Habkost
2016-06-09 17:11 ` [Qemu-arm] [PATCH v2 5/6] arm: virt: parse cpu_model only once Igor Mammedov
2016-06-09 17:11   ` [Qemu-devel] " Igor Mammedov
2016-06-09 17:11 ` [Qemu-devel] [PATCH v2 6/6] pc: parse cpu features " Igor Mammedov
2016-07-04  8:04 ` [Qemu-arm] [Qemu-devel] [PATCH v2 0/6] cpus: make "-cpu cpux, features" global properties Igor Mammedov
2016-07-04  8:04   ` Igor Mammedov
2016-07-04 14:01   ` [Qemu-arm] " Eduardo Habkost
2016-07-04 14:01     ` Eduardo Habkost
2016-07-04 14:32     ` [Qemu-arm] " Igor Mammedov
2016-07-04 14:32       ` Igor Mammedov
2016-07-04 16:21       ` [Qemu-arm] " Eduardo Habkost
2016-07-04 16:21         ` Eduardo Habkost
2016-07-04 16:45         ` Greg Kurz
2016-07-04 16:45           ` Greg Kurz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5759C5F6.4020405@redhat.com \
    --to=eblake@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.