Received: from eggs.gnu.org ([2001:4830:134:3::10]:54102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGUmz-0006Am-P8 for qemu-devel@nongnu.org; Fri, 24 Jun 2016 13:21:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGUmu-0004kz-OT for qemu-devel@nongnu.org; Fri, 24 Jun 2016 13:21:08 -0400 References: <1466007277-17525-1-git-send-email-lvivier@redhat.com> <1466007277-17525-2-git-send-email-lvivier@redhat.com> From: Eric Blake Message-ID: <576D6BFD.3060402@redhat.com> Date: Fri, 24 Jun 2016 11:21:01 -0600 MIME-Version: 1.0 In-Reply-To: <1466007277-17525-2-git-send-email-lvivier@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MqlAlq4NxRWpdowPNpVudhu0A1w0L0lvL" Subject: Re: [Qemu-devel] [PATCH 1/7] coccinelle: add a script to remove useless casts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-trivial@nongnu.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MqlAlq4NxRWpdowPNpVudhu0A1w0L0lvL From: Eric Blake To: Laurent Vivier , qemu-trivial@nongnu.org, qemu-devel@nongnu.org Message-ID: <576D6BFD.3060402@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/7] coccinelle: add a script to remove useless casts References: <1466007277-17525-1-git-send-email-lvivier@redhat.com> <1466007277-17525-2-git-send-email-lvivier@redhat.com> In-Reply-To: <1466007277-17525-2-git-send-email-lvivier@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/15/2016 10:14 AM, Laurent Vivier wrote: > Script from LKML. Link to a particular message? >=20 > Signed-off-by: Laurent Vivier > --- > scripts/coccinelle/typecast.cocci | 7 +++++++ > 1 file changed, 7 insertions(+) > create mode 100644 scripts/coccinelle/typecast.cocci >=20 > diff --git a/scripts/coccinelle/typecast.cocci b/scripts/coccinelle/typ= ecast.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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --MqlAlq4NxRWpdowPNpVudhu0A1w0L0lvL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXbWv9AAoJEKeha0olJ0Nq7JkH/RNSFMi60iHop5z/8dzm0xC3 a2Kvlv+w5ZVra04bShhSOjYiPUCXdo3bPOHQrJSQlhBe62n69fMM7BlCmbA7DbB0 bS3cEl/mX1m0VFeHlpBUI0cMIMuWzoihaBLGHtiGAICGptpmUd612StJVPy4XPAW cMCzvN+CaoE/xjoE4qgiyHUzyA74Dyl5DBn3h/uLO12dyOichU61mkukkmzNuRZF I6E/A12KtOCBZ4hhAEGDP9TqSwvEMUxqHurqWbWQhb7fBDnu0NXndELfnSEbpGsb soLYvMULOXexZUIJWhBaKnR4ItHFPV7NatPJuv+/BsV2SFYX94Y7hTo/s8USVFI= =xsiW -----END PGP SIGNATURE----- --MqlAlq4NxRWpdowPNpVudhu0A1w0L0lvL--