All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, famz@redhat.com,
	pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}
Date: Mon, 12 Sep 2016 13:33:22 +0800	[thread overview]
Message-ID: <20160912053322.GC3776@pxdev.xzpeter.org> (raw)
In-Reply-To: <87inu5m2bj.fsf@dusky.pond.sub.org>

On Fri, Sep 09, 2016 at 07:05:04PM +0200, Markus Armbruster wrote:

[...]

> You effectively propose to revise this coding rule from error.h:
> 
>  * Please don't error_setg(&error_fatal, ...), use error_report() and
>  * exit(), because that's more obvious.
>  * Likewise, don't error_setg(&error_abort, ...), use assert().
> 
> If we accept your proposal, you get to add a patch to update the rule :)

Yep, I was planning to add it in a newer version when needed, or post
it seperately after this series.

[...]

> * Shall we fuse error_report() and exit() into error_report_fatal()?
> 
>   Saves ~200 lines, not counting the Coccinelle semantic patch.
> 
>   I think the real question is what's easier to read and to write.  Do
>   you prefer something like
> 
>                     error_report("ISA bus not available for %s", c->name);
>                     exit(1);
> 
>   or something like
> 
>                     error_report_fatal("ISA bus not available for %s",
>                                        c->name);
> 
>   The second form saves a tiny bit of instruction space, I guess.

For this one, actually that's why I wrote this patchset. However, it
does not mean that I think we should have it. I was just trying to
post this out, to see which one we would like better. For me,
error_report() with an exit() is good enough. So, if we are obviously
liking it, I am willing to continue maintain this series until it's
merged. Otherwise, I am still okay to put this series aside if we do
not have a very strong motivation to do the change. :)

Thanks for reviewing!

-- peterx

  parent reply	other threads:[~2016-09-12  5:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  6:06 [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort} Peter Xu
2016-09-07  6:06 ` [Qemu-devel] [PATCH v4 1/4] error-report: provide error_report_fatal() Peter Xu
2016-09-07  6:06 ` [Qemu-devel] [PATCH v4 2/4] error-report: provide error_report_abort() Peter Xu
2016-09-07  6:06 ` [Qemu-devel] [PATCH v4 3/4] error-report: leverage error_report_fatal() Peter Xu
2016-09-07  6:06 ` [Qemu-devel] [PATCH v4 4/4] error-report: leverage error_report_abort() Peter Xu
2016-09-07  6:39 ` [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort} Fam Zheng
2016-09-07  9:23 ` Alex Bennée
2016-09-07  9:33   ` Fam Zheng
2016-09-07 10:42     ` Peter Xu
2016-09-07 12:39     ` Lluís Vilanova
2016-09-07 13:48       ` Markus Armbruster
2016-09-09 17:05 ` Markus Armbruster
2016-09-09 17:19   ` Daniel P. Berrange
2016-09-12  8:02     ` Markus Armbruster
2016-09-12  5:33   ` Peter Xu [this message]
2016-09-12 19:49   ` Eric Blake
2016-09-13  6:44     ` 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=20160912053322.GC3776@pxdev.xzpeter.org \
    --to=peterx@redhat.com \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.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.