On 06/15/2016 10:14 AM, Laurent Vivier wrote:
> Script from LKML.

Link to a particular message?

> 
> Signed-off-by: Laurent Vivier <lviv...@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 <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to