All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-arm] [PATCH] Use error_fatal to simplify obvious fatal errors
Date: Thu, 10 Dec 2015 11:49:02 +0100	[thread overview]
Message-ID: <5669589E.4050904@redhat.com> (raw)
In-Reply-To: <1449742760-6310-1-git-send-email-armbru@redhat.com>



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. :)

>  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).

Otherwise looks great, thanks!

Paolo

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Use error_fatal to simplify obvious fatal errors
Date: Thu, 10 Dec 2015 11:49:02 +0100	[thread overview]
Message-ID: <5669589E.4050904@redhat.com> (raw)
In-Reply-To: <1449742760-6310-1-git-send-email-armbru@redhat.com>



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. :)

>  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).

Otherwise looks great, thanks!

Paolo

  reply	other threads:[~2015-12-10 10:49 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 ` Paolo Bonzini [this message]
2015-12-10 10:49   ` Paolo Bonzini
2015-12-10 12:31   ` [Qemu-arm] " Markus Armbruster
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=5669589E.4050904@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=mst@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.