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