From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-arm@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH] Use error_fatal to simplify obvious fatal errors
Date: Thu, 10 Dec 2015 13:31:03 +0100 [thread overview]
Message-ID: <87egeufptk.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <5669589E.4050904@redhat.com> (Paolo Bonzini's message of "Thu, 10 Dec 2015 11:49:02 +0100")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 10/12/2015 11:19, Markus Armbruster wrote:
>> + object_property_set_int(OBJECT(cpu), ZYNQ_BOARD_MIDR, "midr",
>> + &error_fatal);object_property_set_int(OBJECT(cpu),
>> + MPCORE_PERIPHBASE,
>> + "reset-cbar",
>> + &error_fatal);object_property_set_bool(OBJECT(cpu),
>> + true,
>> + "realized",
>> + &error_fatal);
>
> Something went wrong here. :)
Once again I demonstrate incompetence at proofreading my own patches %-}
No idea what happened. I'll fix it.
>> void qdev_prop_set_drive_nofail(DeviceState *dev, const char *name,
>> BlockBackend *value)
>> {
>> - Error *err = NULL;
>> -
>> - qdev_prop_set_drive(dev, name, value, &err);
>> - if (err) {
>> - error_report_err(err);
>> - exit(1);
>> - }
>> + qdev_prop_set_drive(dev, name, value, &error_fatal);
>> }
>
>
> This should be inlined entirely into the callers (possibly as a follow up).
Yes, a FOO_nofail() wrapper around a FOO() taking Error ** is pointless.
I'll prep a follow-up patch.
> Otherwise looks great, thanks!
Thanks!
WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-arm@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Use error_fatal to simplify obvious fatal errors
Date: Thu, 10 Dec 2015 13:31:03 +0100 [thread overview]
Message-ID: <87egeufptk.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <5669589E.4050904@redhat.com> (Paolo Bonzini's message of "Thu, 10 Dec 2015 11:49:02 +0100")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 10/12/2015 11:19, Markus Armbruster wrote:
>> + object_property_set_int(OBJECT(cpu), ZYNQ_BOARD_MIDR, "midr",
>> + &error_fatal);object_property_set_int(OBJECT(cpu),
>> + MPCORE_PERIPHBASE,
>> + "reset-cbar",
>> + &error_fatal);object_property_set_bool(OBJECT(cpu),
>> + true,
>> + "realized",
>> + &error_fatal);
>
> Something went wrong here. :)
Once again I demonstrate incompetence at proofreading my own patches %-}
No idea what happened. I'll fix it.
>> void qdev_prop_set_drive_nofail(DeviceState *dev, const char *name,
>> BlockBackend *value)
>> {
>> - Error *err = NULL;
>> -
>> - qdev_prop_set_drive(dev, name, value, &err);
>> - if (err) {
>> - error_report_err(err);
>> - exit(1);
>> - }
>> + qdev_prop_set_drive(dev, name, value, &error_fatal);
>> }
>
>
> This should be inlined entirely into the callers (possibly as a follow up).
Yes, a FOO_nofail() wrapper around a FOO() taking Error ** is pointless.
I'll prep a follow-up patch.
> Otherwise looks great, thanks!
Thanks!
next prev parent reply other threads:[~2015-12-10 12:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 10:19 [Qemu-arm] [PATCH] Use error_fatal to simplify obvious fatal errors Markus Armbruster
2015-12-10 10:19 ` [Qemu-devel] " Markus Armbruster
2015-12-10 10:49 ` [Qemu-arm] " Paolo Bonzini
2015-12-10 10:49 ` [Qemu-devel] " Paolo Bonzini
2015-12-10 12:31 ` Markus Armbruster [this message]
2015-12-10 12:31 ` Markus Armbruster
2015-12-10 13:41 ` Markus Armbruster
2015-12-10 11:32 ` Marcel Apfelbaum
2015-12-10 12:34 ` [Qemu-arm] " Markus Armbruster
2015-12-10 12:34 ` Markus Armbruster
2015-12-10 13:58 ` Marcel Apfelbaum
2015-12-10 14:16 ` [Qemu-arm] " Paolo Bonzini
2015-12-10 14:16 ` Paolo Bonzini
2015-12-10 14:32 ` [Qemu-arm] " Markus Armbruster
2015-12-10 14:32 ` Markus Armbruster
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=87egeufptk.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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.