From: Eric Blake <eblake@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>,
qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 1/7] coccinelle: add a script to remove useless casts
Date: Fri, 24 Jun 2016 11:21:01 -0600 [thread overview]
Message-ID: <576D6BFD.3060402@redhat.com> (raw)
In-Reply-To: <1466007277-17525-2-git-send-email-lvivier@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 963 bytes --]
On 06/15/2016 10:14 AM, Laurent Vivier wrote:
> Script from LKML.
Link to a particular message?
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> ---
> scripts/coccinelle/typecast.cocci | 7 +++++++
> 1 file changed, 7 insertions(+)
> create mode 100644 scripts/coccinelle/typecast.cocci
>
> diff --git a/scripts/coccinelle/typecast.cocci b/scripts/coccinelle/typecast.cocci
> new file mode 100644
> index 0000000..be2183e
> --- /dev/null
> +++ b/scripts/coccinelle/typecast.cocci
> @@ -0,0 +1,7 @@
> +// Remove useless casts
> +@@
> +type T;
> +T v;
> +@@
> +- (T *)&v
> ++ &v
Since we're using C for the most part, do we also want to remove useless
casts in and out of void*?
But even if we do that, it could be separate. This patch looks good on
its own:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
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-24 17:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 16:14 [Qemu-trivial] [PATCH 0/7] Remove useless casts Laurent Vivier
2016-06-15 16:14 ` [Qemu-trivial] [PATCH 1/7] coccinelle: add a script to remove " Laurent Vivier
2016-06-24 17:21 ` Eric Blake [this message]
2016-06-15 16:14 ` [Qemu-trivial] [PATCH 2/7] linux-user,s390x: remove useless cast Laurent Vivier
2016-06-15 16:14 ` [Qemu-trivial] [PATCH 3/7] s390x: " Laurent Vivier
2016-06-15 16:14 ` [Qemu-trivial] [PATCH 4/7] tricore: " Laurent Vivier
2016-06-16 8:17 ` [Qemu-trivial] [Qemu-devel] " Bastian Koppelmann
2016-06-15 16:14 ` [Qemu-trivial] [PATCH 5/7] fw_cfg: remove useless casts Laurent Vivier
2016-06-15 16:34 ` Laszlo Ersek
2016-06-15 16:14 ` [Qemu-trivial] [PATCH 6/7] crypto: " Laurent Vivier
2016-06-23 11:07 ` Daniel P. Berrange
2016-09-14 7:40 ` Michael Tokarev
2016-06-15 16:14 ` [Qemu-trivial] [PATCH 7/7] sheepdog: " Laurent Vivier
2016-06-17 3:23 ` [Qemu-trivial] [Qemu-devel] " Hitoshi Mitake
2016-06-23 11:03 ` [Qemu-trivial] [Qemu-devel] [PATCH 0/7] Remove " Laurent Vivier
2016-09-14 7:18 ` [Qemu-trivial] " Michael Tokarev
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=576D6BFD.3060402@redhat.com \
--to=eblake@redhat.com \
--cc=lvivier@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).