[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/26] coccinelle: use exit(EXIT_SUCCESS) and ex
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 01/26] coccinelle: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE) |
Date: |
Fri, 16 Sep 2016 10:35:42 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 09/16/2016 08:55 AM, Laurent Vivier wrote:
> Signed-off-by: Laurent Vivier <address@hidden>
> ---
> scripts/coccinelle/exit.cocci | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
> create mode 100644 scripts/coccinelle/exit.cocci
>
Script itself is fine. Whether to apply it throughout the tree is a
cosmetic question, but I'm in favor of it; and the script will help us
keep the tree clean. Do we need/want to update HACKING to mention our
new enforced style as well, later in the series?
Reviewed-by: Eric Blake <address@hidden>
However, Coccinelle doesn't seem to catch comments; your series has
missed at least the 'exit(1)' in the comments of include/qapi/error.h.
> diff --git a/scripts/coccinelle/exit.cocci b/scripts/coccinelle/exit.cocci
> new file mode 100644
> index 0000000..73386c0
> --- /dev/null
> +++ b/scripts/coccinelle/exit.cocci
> @@ -0,0 +1,12 @@
> +// replace exit(0) by exit(EXIT_SUCCESS)
> +// exit(1) by exit(EXIT_FAILURE)
> +
> +@@
> +@@
> +(
> +- exit(0)
> ++ exit(EXIT_SUCCESS)
> +|
> +- exit(1)
> ++ exit(EXIT_FAILURE)
> +)
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 10/26] m68k: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), (continued)
- [Qemu-devel] [PATCH 10/26] m68k: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 18/26] posix: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 25/26] hw: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 14/26] x86: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 05/26] ppc: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 03/26] cris: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 09/26] qemu-user: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 24/26] error, trace: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 01/26] coccinelle: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- Re: [Qemu-devel] [PATCH 01/26] coccinelle: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE),
Eric Blake <=
- [Qemu-devel] [PATCH 04/26] block: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 02/26] arm: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 17/26] tcg: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 15/26] mips: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 21/26] misc machine: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 12/26] sparc: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 06/26] graphics: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 11/26] pci, virtio: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 08/26] replay: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16
- [Qemu-devel] [PATCH 26/26] net: use exit(EXIT_SUCCESS) and exit(EXIT_FAILURE), Laurent Vivier, 2016/09/16