Peter Maydell <peter.mayd...@linaro.org> writes: > On 14 December 2015 at 19:25, Markus Armbruster <arm...@redhat.com> wrote: >> Eduardo Habkost <ehabk...@redhat.com> writes: >> >>> On Thu, Dec 10, 2015 at 05:29:14PM +0100, Markus Armbruster wrote: >>>> Done with this admittedly crude Coccinelle semantic patch: >>>> >>> >>> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> >>> >>> You can rewrite the semantic patch as: > [...] >>> Coccinelle seems to have some magic to make "LIST," also match >>> with an empty list. >> >> Same output as my script, except it doesn't mess up zynq_init(). Sold! > > Do you mean by this that you're planning to send a v3, or would you > like me to apply v2 to target-arm.next?
I only changed PATCH 1's commit message since v2 (current version appended). I plan to include the series in a pull request in my role as error reporting maintainer, but I don't mind "losing" patches to other maintainers on the way. Use error_fatal to simplify obvious fatal errors Done with this Coccinelle semantic patch: @@ type T; identifier FUN, RET; expression list ARGS; expression ERR, EC; @@ ( - T RET = FUN(ARGS, &ERR); + T RET = FUN(ARGS, &error_fatal); | - RET = FUN(ARGS, &ERR); + RET = FUN(ARGS, &error_fatal); | - FUN(ARGS, &ERR); + FUN(ARGS, &error_fatal); ) - if (ERR != NULL) { - error_report_err(ERR); - exit(EC); - } This is actually a more elegant version of my initial semantic patch by courtesy of Eduardo. It leaves dead Error * variables behind, cleaned up manually. Cc: qemu-...@nongnu.org Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Eduardo Habkost <ehabk...@redhat.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Markus Armbruster <arm...@redhat.com> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com>