From: Eric Blake <eblake@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 2/3] error: Remove unnecessary local_err variables
Date: Mon, 13 Jun 2016 17:06:05 -0600 [thread overview]
Message-ID: <575F3C5D.2070000@redhat.com> (raw)
In-Reply-To: <1465855078-19435-3-git-send-email-ehabkost@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]
On 06/13/2016 03:57 PM, Eduardo Habkost wrote:
> This patch simplifies code that uses a local_err variable just to
> immediately use it for an error_propagate() call.
>
> Coccinelle patch used to perform the changes added to
> scripts/coccinelle/remove_local_err.cocci.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * (new patch)
>
> Changes v2 -> v3:
> * Remove unused metavariable from script
> * Do changes only if errp is not touched before the error_setg()
> call (so we are sure *errp is not set and error_setg() won't
> abort)
> * Changes dropped from v2 due to script changes:
> * block.c:bdrv_create_co_entry()
This one still qualifies as a single use of errp, it's just that script
is now too strict to see it. Can be cleaned up in a followup, to keep
this patch as strict Coccinelle changes.
> * block.c:bdrv_create_file()
Correct to drop this one.
> * blockdev.c:qmp_blockdev_mirror()
Correct to drop this one (bdrv_lookup_bs() should never set errp when
returning non-NULL, but Coccinelle can't see that).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-06-13 23:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 21:57 [Qemu-devel] [PATCH v3 0/3] coccinelle: Clean up error checks and return value variables Eduardo Habkost
2016-06-13 21:57 ` [Qemu-devel] [PATCH v3 1/3] error: Remove NULL checks on error_propagate() calls Eduardo Habkost
2016-06-13 21:57 ` [Qemu-devel] [PATCH v3 2/3] error: Remove unnecessary local_err variables Eduardo Habkost
2016-06-13 23:06 ` Eric Blake [this message]
2016-06-14 8:49 ` Markus Armbruster
2016-06-13 21:57 ` [Qemu-devel] [PATCH v3 3/3] coccinelle: Remove unnecessary variables for function return value Eduardo Habkost
2016-06-14 8:57 ` Markus Armbruster
2016-06-14 9:11 ` Paolo Bonzini
2016-06-14 11:20 ` Markus Armbruster
2016-06-14 11:58 ` Eduardo Habkost
2016-06-14 11:20 ` Eduardo Habkost
2016-06-14 9:03 ` [Qemu-devel] [PATCH v3 0/3] coccinelle: Clean up error checks and return value variables Markus Armbruster
2016-06-14 17:45 ` Markus Armbruster
2016-06-14 17:46 ` Eduardo Habkost
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=575F3C5D.2070000@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--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.